From b19d489a4c1722b835c3842b38f48f0b9f074583 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Sat, 29 Jul 2023 23:05:47 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Add=20username=20from=20se?= =?UTF-8?q?ssion=20to=20manage=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/manage/index.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/pages/manage/index.tsx b/src/pages/manage/index.tsx index 0de53cc5b..bd0bdb45e 100644 --- a/src/pages/manage/index.tsx +++ b/src/pages/manage/index.tsx @@ -10,6 +10,7 @@ import { createStyles, } from '@mantine/core'; import { IconArrowRight } from '@tabler/icons-react'; +import { useSession } from 'next-auth/react'; import Image from 'next/image'; import { MainLayout } from '~/components/layout/admin/main-admin.layout'; import { useScreenLargerThan } from '~/hooks/useScreenLargerThan'; @@ -17,13 +18,15 @@ import { useScreenLargerThan } from '~/hooks/useScreenLargerThan'; const ManagementPage = () => { const { classes } = useStyles(); const largerThanMd = useScreenLargerThan('md'); + const { data: sessionData } = useSession(); + return ( - Welcome back, Manicraft1001 + Welcome back, {sessionData?.user?.name ?? 'Anonymous'} Welcome to Your Application Hub. Organize, Optimize, and Conquer! @@ -34,7 +37,12 @@ const ManagementPage = () => { top={largerThanMd ? undefined : -120} right={largerThanMd ? 0 : -40} > - +