setup: route group

This commit is contained in:
Mahyar Khanbolooki
2025-07-31 19:13:24 +03:30
parent 118daf7cc0
commit 52b5b880d0
25 changed files with 169 additions and 111 deletions
+98
View File
@@ -0,0 +1,98 @@
"use client";
import Button from '@/components/button/PrimaryButton';
// import { useProfile } from '@/hooks/auth/useProfile';
// import { useAuthStore } from '@/zustand/authStore';
import { ArrowLeft, Calendar2, CallCalling, Profile, Sms, Verify } from 'iconsax-react';
import Image from 'next/image';
import Link from 'next/link';
import { useRouter } from 'next/navigation';
import React from 'react'
type Props = object
function ProfileIndex({ }: Props) {
const router = useRouter();
// const isAuthenticated = useAuthStore((state) => state.isAuthenticated);
// const { mutate, data, isPending } = useProfile();
// useEffect(() => {
// if (isAuthenticated) {
// mutate();
// }
// // eslint-disable-next-line react-hooks/exhaustive-deps
// }, [isAuthenticated])
return (
<div className='overflow-y-auto h-full noscrollbar flex flex-col'>
<div className='grid grid-cols-3 items-center'>
<span></span>
<h1 className='text-sm2 place-self-center font-medium'>پروفایل کاربری</h1>
<ArrowLeft
className='cursor-pointer place-self-end'
size='24'
color='currentColor'
onClick={() => { router.back() }}
/>
</div>
<div className="mt-8 flex-1 h-full bg-container rounded-container w-full box-shadow-normal py-6 px-4 flex flex-col justify-between">
<div className="">
<div className="flex items-center justify-start gap-4 pb-6 border-b-[1.5px] border-border">
<Image
src={'/assets/images/user-avatar.png'}
className='rounded-full'
alt='user avatar'
width={80}
height={80}
/>
<div className='block'>
<div className='font-medium text-base '>علیرضا عابدزاده</div>
<div className='text-xs text-primary mt-3 inline-flex items-center gap-2'>
<Verify size={16} className='stroke-primary mb-0.5' />
<span>
شناسه کاربری:
</span>
<span>2162165</span>
</div>
</div>
</div>
<div className="grid gap-6 mt-6">
<div className='inline-flex items-center gap-2.5'>
<CallCalling size={16} className='stroke-disabled2 mb-0.5' />
<span className='text-sm2 text-disabled2'>شماره همراه:</span>
<span className='text-sm2'>09010901738</span>
</div>
<div className='inline-flex items-center gap-2.5'>
<Sms size={16} className='stroke-disabled2 mb-0.5' />
<span className='text-sm2 text-disabled2'>ایمیل:</span>
<span className='text-sm2'>alirezaabed@gmail.com</span>
</div>
<div className='inline-flex items-center gap-2.5'>
<Calendar2 size={16} className='stroke-disabled2 mb-0.5' />
<span className='text-sm2 text-disabled2'>تاریخ تولد:</span>
<span className='text-sm2'>1375/5/14</span>
</div>
<div className='inline-flex items-center gap-2.5'>
<Profile size={16} className='stroke-disabled2 mb-0.5' />
<span className='text-sm2 text-disabled2'>جنسیت:</span>
<span className='text-sm2'>آقا</span>
</div>
</div>
</div>
<div className='w-full text-center mt-6'>
<Link href={'profile/edit'}>
<Button>ویرایش اطلاعات</Button>
</Link>
</div>
</div>
</div>
)
}
export default ProfileIndex