-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: profile and handle refresh token
- Loading branch information
Showing
27 changed files
with
300 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
{ | ||
"arrowParens": "always", | ||
"semi": false, | ||
"trailingComma": "none", | ||
"tabWidth": 2, | ||
"endOfLine": "auto", | ||
"useTabs": false, | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"jsxSingleQuote": true | ||
} | ||
"arrowParens": "always", | ||
"semi": false, | ||
"trailingComma": "none", | ||
"tabWidth": 2, | ||
"endOfLine": "auto", | ||
"useTabs": false, | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"jsxSingleQuote": true, | ||
"plugins": ["prettier-plugin-organize-attributes", "prettier-plugin-organize-imports", "prettier-plugin-tailwindcss"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import UserSideNav from '../components/UserSideNav' | ||
|
||
interface LayoutProps { | ||
children?: React.ReactNode | ||
} | ||
|
||
export default function UserLayout({ children }: LayoutProps) { | ||
return ( | ||
<div className='bg-neutral-100 py-16 text-sm text-gray-600'> | ||
<div className='container'> | ||
<div className='grid grid-cols-1 gap-6 md:grid-cols-12'> | ||
<div className='md:col-span-3 lg:col-span-2'> | ||
<UserSideNav /> | ||
</div> | ||
|
||
<div className='md:col-span-9 lg:col-span-10'>{children}</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import UserLayout from './UserLayout' | ||
|
||
export default UserLayout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { Link } from 'react-router-dom' | ||
import path from 'src/constants/path' | ||
|
||
export default function UserSideNav() { | ||
return ( | ||
<div> | ||
<div className='flex items-center border-b border-b-gray-200 py-4'> | ||
<Link to={path.profile} className='h-12 w-12 flex-shrink-0 overflow-hidden rounded-full border border-black/10'> | ||
<img | ||
src='https://down-vn.img.susercontent.com/file/vn-11134226-7r98o-lsrvn68ui3kp21_tn' | ||
alt='avatar' | ||
className='h-full w-full object-cover' | ||
/> | ||
</Link> | ||
<div className='flex-grow pl-4'> | ||
<div className='mb-1 truncate font-semibold text-gray-600'>Nguyễn Nhâm Ngọ</div> | ||
<Link to={path.profile} className='flex items-center capitalize text-gray-500'> | ||
<svg | ||
width={12} | ||
height={12} | ||
viewBox='0 0 12 12' | ||
xmlns='http://www.w3.org/2000/svg' | ||
style={{ marginRight: 4 }} | ||
> | ||
<path | ||
d='M8.54 0L6.987 1.56l3.46 3.48L12 3.48M0 8.52l.073 3.428L3.46 12l6.21-6.18-3.46-3.48' | ||
fill='#9B9B9B' | ||
fillRule='evenodd' | ||
/> | ||
</svg> | ||
Sửa hồ sơ | ||
</Link> | ||
</div> | ||
</div> | ||
<div className='mt-7'> | ||
<Link to={path.profile} className='flex mt-4 items-center capitalize text-orange transition-colors'> | ||
<div className='mr-3 h-[22px] w-[22px]'> | ||
<img | ||
src='https://down-vn.img.susercontent.com/file/ba61750a46794d8847c3f463c5e71cc4' | ||
className='w-full h-full' | ||
/> | ||
</div> | ||
Tải khoản của tôi | ||
</Link> | ||
<Link to={path.changPassword} className='flex mt-4 items-center capitalize text-gray-600 transition-colors'> | ||
<div className='mr-3 h-[22px] w-[22px]'> | ||
<img | ||
src='https://down-vn.img.susercontent.com/file/ba61750a46794d8847c3f463c5e71cc4' | ||
className='w-full h-full' | ||
/> | ||
</div> | ||
Đổi mật khẩu | ||
</Link> | ||
<Link to={path.historyPurchase} className='flex mt-4 items-center capitalize text-gray-600 transition-colors'> | ||
<div className='mr-3 h-[22px] w-[22px]'> | ||
<img | ||
src='https://down-vn.img.susercontent.com/file/f0049e9df4e536bc3e7f140d071e9078' | ||
className='w-full h-full' | ||
/> | ||
</div> | ||
Đơn mua | ||
</Link> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import UserSideNav from './UserSideNav' | ||
|
||
export default UserSideNav |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function ChangePassword() { | ||
return <div>ChangePassword</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import ChangePassword from './ChangePassword' | ||
|
||
export default ChangePassword |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function HistoryPurchase() { | ||
return <div>HistoryPurchase</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import HistoryPurchase from './HistoryPurchase' | ||
|
||
export default HistoryPurchase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import Input from 'src/components/Input' | ||
|
||
export default function Profile() { | ||
return ( | ||
<div className='rounded-sm bg-white px pb-10 md:px-7 md:pb-20 shadow'> | ||
<div className='border-b border-b-gray-200 py-6'> | ||
<h1 className='text-lg font-medium capitalize text-gray-900'>Hồ sở của tôi</h1> | ||
<div className='mt-1 text-sm text-gray-700'>Quản lý thông tin hồ sở để bảo mật tài khoản</div> | ||
</div> | ||
<div className='mt-8 flex flex-col-reverse md:flex-row md:items-start'> | ||
<form className='mt-6 flex-grow pr-5 md:pr-12 md:mt-0'> | ||
<div className='flex flex-wrap flex-col sm:flex-row'> | ||
<div className='sm:w-[20%] truncate pt-3 sm:text-right capitalize'>Email</div> | ||
<div className='sm:w-[80%] sm:pl-5'> | ||
<div className='pt-3 text-gray-700'>nhamngoo*****@gmail.com</div> | ||
</div> | ||
</div> | ||
<div className='mt-6 flex flex-wrap flex-col sm:flex-row'> | ||
<div className='sm:w-[20%] truncate pt-3 sm:text-right'>Họ và tên</div> | ||
<div className='sm:w-[80%] sm:pl-5'> | ||
<Input classNameInput='px-1 py-2 w-full outline-none border border-gray-300 focus:border-gray-500 rounded-sm focus:shadow-sm'></Input> | ||
</div> | ||
</div> | ||
<div className='mt-2 flex flex-wrap flex-col sm:flex-row'> | ||
<div className='sm:w-[20%] truncate pt-3 sm:text-right'>Số điện thoại</div> | ||
<div className='sm:w-[80%] sm:pl-5'> | ||
<Input classNameInput='px-1 py-2 w-full outline-none border border-gray-300 focus:border-gray-500 rounded-sm focus:shadow-sm'></Input> | ||
</div> | ||
</div> | ||
<div className='mt-2 flex flex-wrap flex-col sm:flex-row'> | ||
<div className='sm:w-[20%] truncate pt-3 sm:text-right'>Địa chỉ</div> | ||
<div className='sm:w-[80%] sm:pl-5'> | ||
<Input classNameInput='px-1 py-2 w-full outline-none border border-gray-300 focus:border-gray-500 rounded-sm focus:shadow-sm'></Input> | ||
</div> | ||
</div> | ||
<div className='mt-2 flex flex-wrap flex-col sm:flex-row'> | ||
<div className='sm:w-[20%] truncate pt-3 sm:text-right'>Ngày sinh</div> | ||
<div className='flex justify-between sm:pl-5 sm:w-[50%]'> | ||
<select className='h-10 w-[32%] rounded-sm border border-black/10 px-3 hover:border-orange outline-none'> | ||
<option value='' disabled selected hidden className='text-black/10'> | ||
Ngày | ||
</option> | ||
<option value='1'>Option 1</option> | ||
<option value='2'>Option 2</option> | ||
<option value='3'>Option 3</option> | ||
</select> | ||
<select className='h-10 w-[32%] rounded-sm border border-black/10 px-3 hover:border-orange outline-none'> | ||
<option value='' disabled selected hidden className='text-black/10'> | ||
Tháng | ||
</option> | ||
<option value='1'>Option 1</option> | ||
<option value='2'>Option 2</option> | ||
<option value='3'>Option 3</option> | ||
</select> | ||
<select className='h-10 w-[32%] rounded-sm border border-black/10 px-3 hover:border-orange outline-none'> | ||
<option value='' disabled selected hidden className='text-black/10'> | ||
Năm | ||
</option> | ||
<option value='1'>Option 1</option> | ||
<option value='2'>Option 2</option> | ||
<option value='3'>Option 3</option> | ||
</select> | ||
</div> | ||
</div> | ||
</form> | ||
<div className='flex justify-center md:w-72 md:border-l md:border-l-gray-200'> | ||
<div className='flex flex-col items-center'> | ||
<div className='my-5 h-24 w-24'> | ||
<img | ||
src='https://down-vn.img.susercontent.com/file/vn-11134226-7r98o-lsrvn68ui3kp21_tn' | ||
alt='avatar' | ||
className='w-full h-full rounded-full object-cover' | ||
/> | ||
</div> | ||
<input type='file' className='hidden' accept='.jpg,.jpeg,.png' /> | ||
<button className='flex h-10 items-center justify-end rounded-sm border bg-white px-6 text-sm text-gray-600 shadow-sm'> | ||
Chọn ảnh | ||
</button> | ||
<div className='mt-3 text-gray-400'> | ||
<div>Dung lương file tối đa 1 MB</div> | ||
<div>Định dạng: ,JPG, .JPEG, .PNG</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
File renamed without changes.
Oops, something went wrong.