diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/header/ProfileOrLogin.tsx | 6 | ||||
| -rw-r--r-- | src/components/header/authdialog/RegisterForm.tsx | 6 | ||||
| -rw-r--r-- | src/components/settings/ProfilePage.tsx | 20 |
3 files changed, 6 insertions, 26 deletions
diff --git a/src/components/header/ProfileOrLogin.tsx b/src/components/header/ProfileOrLogin.tsx index 416418b..68c81f6 100644 --- a/src/components/header/ProfileOrLogin.tsx +++ b/src/components/header/ProfileOrLogin.tsx @@ -21,11 +21,11 @@ export function ProfileOrLogin() { </Dialog> ); } - + const profileLink = `/profile/${user.username}`; return ( - <Link href={'/profile'}> + <Link href={profileLink}> <Image - src={user?.avatar ?? 'icons/avatar.svg'} + src={user?.avatar ?? '/icons/avatar.svg'} alt="" width={60} height={60} diff --git a/src/components/header/authdialog/RegisterForm.tsx b/src/components/header/authdialog/RegisterForm.tsx index c8ddb55..0370671 100644 --- a/src/components/header/authdialog/RegisterForm.tsx +++ b/src/components/header/authdialog/RegisterForm.tsx @@ -41,12 +41,8 @@ export default function RegisterForm() { if (error) { setErrors(error); } else if (data) { - setUser({ - id: data.id, - username: data.username, - }); + setUser(data); } - setLoading(false); }; diff --git a/src/components/settings/ProfilePage.tsx b/src/components/settings/ProfilePage.tsx index 60ff41f..9d5b81b 100644 --- a/src/components/settings/ProfilePage.tsx +++ b/src/components/settings/ProfilePage.tsx @@ -3,21 +3,6 @@ import { Input } from '@/components/ui/input'; import { Button } from '@/components/ui'; import { Separator } from '@/components/ui'; -const gradients = [ - 'linear-gradient(89.91deg, #8784C9 0%, #464199 99.92%)', - 'linear-gradient(284.32deg, #FFAFBD 20.33%, #DAE2F8 79.67%)', - 'linear-gradient(267.9deg, #473B7B 0%, #30D2BE 100%)', - 'linear-gradient(88.87deg, #C33764 0%, #1D2671 100%)', - 'linear-gradient(267.9deg, #134E5E 0%, #71B280 100%)', - 'linear-gradient(87.9deg, #423AA2 0%, #100626 100%)', - 'linear-gradient(87.9deg, #EDF3F6 0%, #D9EAF4 100%)', - 'linear-gradient(284.32deg, #212121 20.33%, #454545 79.67%)', - 'linear-gradient(88.87deg, #610000 0%, #190A05 100%)', - 'linear-gradient(87.9deg, #FFC500 0%, #C21500 100%)', - 'linear-gradient(270deg, #6A11CB 0%, #69A1FF 100%)', - 'linear-gradient(267.9deg, #182848 0%, #4B6CB7 100%)', -]; - export default function ProfilePage() { return ( <div className="flex flex-col flex-start gap-[20px] w-[900px] h-[804px]"> @@ -56,11 +41,10 @@ export default function ProfilePage() { </p> <div className="flex flex-row flex-wrap items-center content-start gap-[5px] w-[265px] h-[85px]"> - {gradients.map((gradient, index) => ( + {Array.from({ length: 12 }).map((_, index) => ( <div key={index} - style={{ background: gradient }} - className="w-[40px] h-[40px] rounded-full cursor-pointer" + className={`w-[40px] h-[40px] rounded-full cursor-pointer gradient-${index}`} /> ))} </div> |
