From 46a8bcc0309362770920891d247764ce7495463a Mon Sep 17 00:00:00 2001 From: jiho Date: Mon, 11 Mar 2024 23:22:53 +0900 Subject: [PATCH 1/5] fix(fe): add hamburger --- apps/frontend/app/(main)/page.tsx | 6 +- .../components/auth/HeaderAuthPanel.tsx | 94 ++++++++++++++++++- 2 files changed, 94 insertions(+), 6 deletions(-) diff --git a/apps/frontend/app/(main)/page.tsx b/apps/frontend/app/(main)/page.tsx index a2ad15597f..9d5c758fa6 100644 --- a/apps/frontend/app/(main)/page.tsx +++ b/apps/frontend/app/(main)/page.tsx @@ -7,7 +7,7 @@ import type { Route } from 'next' import Link from 'next/link' import { Suspense } from 'react' import Carousel from './_components/Carousel' -import ContestCards from './_components/ContestCards' +// import ContestCards from './_components/ContestCards' import ProblemCards from './_components/ProblemCards' // FIXME: Build error occurs when using static routes @@ -49,7 +49,7 @@ export default function Home() { return (
-
+ {/*

Contest

@@ -67,7 +67,7 @@ export default function Home() {
-
+
*/}

Professor’s Recommendation

diff --git a/apps/frontend/components/auth/HeaderAuthPanel.tsx b/apps/frontend/components/auth/HeaderAuthPanel.tsx index 56707709f7..427b51df81 100644 --- a/apps/frontend/components/auth/HeaderAuthPanel.tsx +++ b/apps/frontend/components/auth/HeaderAuthPanel.tsx @@ -6,12 +6,14 @@ import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger, - DropdownMenuItem + DropdownMenuItem, + DropdownMenuSeparator } from '@/components/ui/dropdown-menu' import { cn } from '@/lib/utils' import useAuthModalStore from '@/stores/authModal' import useSignUpModalStore from '@/stores/signUpModal' import { LogOut, User, UserRoundCog } from 'lucide-react' +import type { Route } from 'next' import type { Session } from 'next-auth' import { signOut } from 'next-auth/react' import Link from 'next/link' @@ -41,7 +43,7 @@ export default function HeaderAuthPanel({
{session ? ( - +

)} - + {session ? ( + + + + + + {session?.user.role !== 'User' && ( + + + Management + + + )} + { + signOut() + }} + > + {session?.user.username} + + + + + Notice + + + + + Contest + + + + + Problem + + + + { + signOut() + }} + > + Log Out + + + + ) : ( +

+ + + + + + + { + e.preventDefault() + }} + className="min-h-[30rem] max-w-[20.5rem]" + > + + + + )}
) } From 47c18f827c02e68b8c16eacc14511165fbbb2b54 Mon Sep 17 00:00:00 2001 From: jiho Date: Mon, 11 Mar 2024 23:25:04 +0900 Subject: [PATCH 2/5] fix --- apps/frontend/components/auth/HeaderAuthPanel.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/frontend/components/auth/HeaderAuthPanel.tsx b/apps/frontend/components/auth/HeaderAuthPanel.tsx index 427b51df81..25a64b93c9 100644 --- a/apps/frontend/components/auth/HeaderAuthPanel.tsx +++ b/apps/frontend/components/auth/HeaderAuthPanel.tsx @@ -13,7 +13,6 @@ import { cn } from '@/lib/utils' import useAuthModalStore from '@/stores/authModal' import useSignUpModalStore from '@/stores/signUpModal' import { LogOut, User, UserRoundCog } from 'lucide-react' -import type { Route } from 'next' import type { Session } from 'next-auth' import { signOut } from 'next-auth/react' import Link from 'next/link' From 0de1c5a99096732161c324bd2ce1e76ac1a2c76e Mon Sep 17 00:00:00 2001 From: jiho Date: Mon, 11 Mar 2024 23:31:59 +0900 Subject: [PATCH 3/5] fix(fe): fix Header Auth Panel --- apps/frontend/components/auth/HeaderAuthPanel.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/frontend/components/auth/HeaderAuthPanel.tsx b/apps/frontend/components/auth/HeaderAuthPanel.tsx index 25a64b93c9..cce6f4cdbe 100644 --- a/apps/frontend/components/auth/HeaderAuthPanel.tsx +++ b/apps/frontend/components/auth/HeaderAuthPanel.tsx @@ -37,7 +37,6 @@ export default function HeaderAuthPanel({ (state) => state ) const { setModalPage } = useSignUpModalStore((state) => state) - return (
{session ? ( From 779284ab1af0c27f542000c9057fe405d0515c01 Mon Sep 17 00:00:00 2001 From: jiho Date: Tue, 12 Mar 2024 22:47:26 +0900 Subject: [PATCH 4/5] fix(fe): change order of hamburger list --- .../frontend/components/auth/HeaderAuthPanel.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/frontend/components/auth/HeaderAuthPanel.tsx b/apps/frontend/components/auth/HeaderAuthPanel.tsx index cce6f4cdbe..6db78c7622 100644 --- a/apps/frontend/components/auth/HeaderAuthPanel.tsx +++ b/apps/frontend/components/auth/HeaderAuthPanel.tsx @@ -113,16 +113,9 @@ export default function HeaderAuthPanel({ {session ? ( - + - {session?.user.role !== 'User' && ( - - - Management - - - )} { @@ -131,6 +124,13 @@ export default function HeaderAuthPanel({ > {session?.user.username} + {session?.user.role !== 'User' && ( + + + Management + + + )} From 48734aee13e0713e857c8134504339d215fbd2ff Mon Sep 17 00:00:00 2001 From: jiho Date: Tue, 12 Mar 2024 22:56:25 +0900 Subject: [PATCH 5/5] fix(fe): change order --- apps/frontend/components/auth/HeaderAuthPanel.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/apps/frontend/components/auth/HeaderAuthPanel.tsx b/apps/frontend/components/auth/HeaderAuthPanel.tsx index 6db78c7622..0d289215ae 100644 --- a/apps/frontend/components/auth/HeaderAuthPanel.tsx +++ b/apps/frontend/components/auth/HeaderAuthPanel.tsx @@ -124,13 +124,7 @@ export default function HeaderAuthPanel({ > {session?.user.username} - {session?.user.role !== 'User' && ( - - - Management - - - )} + @@ -148,6 +142,13 @@ export default function HeaderAuthPanel({ + {session?.user.role !== 'User' && ( + + + Management + + + )} {