mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-09 23:15:46 +01:00
♻️ Add username from session to manage page
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
|||||||
createStyles,
|
createStyles,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
import { IconArrowRight } from '@tabler/icons-react';
|
import { IconArrowRight } from '@tabler/icons-react';
|
||||||
|
import { useSession } from 'next-auth/react';
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import { MainLayout } from '~/components/layout/admin/main-admin.layout';
|
import { MainLayout } from '~/components/layout/admin/main-admin.layout';
|
||||||
import { useScreenLargerThan } from '~/hooks/useScreenLargerThan';
|
import { useScreenLargerThan } from '~/hooks/useScreenLargerThan';
|
||||||
@@ -17,13 +18,15 @@ import { useScreenLargerThan } from '~/hooks/useScreenLargerThan';
|
|||||||
const ManagementPage = () => {
|
const ManagementPage = () => {
|
||||||
const { classes } = useStyles();
|
const { classes } = useStyles();
|
||||||
const largerThanMd = useScreenLargerThan('md');
|
const largerThanMd = useScreenLargerThan('md');
|
||||||
|
const { data: sessionData } = useSession();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MainLayout>
|
<MainLayout>
|
||||||
<Box className={classes.box} w="100%" mih={150} p="xl" mb={50}>
|
<Box className={classes.box} w="100%" mih={150} p="xl" mb={50}>
|
||||||
<Group position="apart" noWrap>
|
<Group position="apart" noWrap>
|
||||||
<Stack spacing={15}>
|
<Stack spacing={15}>
|
||||||
<Title className={classes.boxTitle} order={2}>
|
<Title className={classes.boxTitle} order={2}>
|
||||||
Welcome back, Manicraft1001
|
Welcome back, {sessionData?.user?.name ?? 'Anonymous'}
|
||||||
</Title>
|
</Title>
|
||||||
<Text>Welcome to Your Application Hub. Organize, Optimize, and Conquer!</Text>
|
<Text>Welcome to Your Application Hub. Organize, Optimize, and Conquer!</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -34,7 +37,12 @@ const ManagementPage = () => {
|
|||||||
top={largerThanMd ? undefined : -120}
|
top={largerThanMd ? undefined : -120}
|
||||||
right={largerThanMd ? 0 : -40}
|
right={largerThanMd ? 0 : -40}
|
||||||
>
|
>
|
||||||
<Image src="/imgs/logo/logo.png" width={largerThanMd ? 200 : 100} height={largerThanMd ? 150 : 60} alt="" />
|
<Image
|
||||||
|
src="/imgs/logo/logo.png"
|
||||||
|
width={largerThanMd ? 200 : 100}
|
||||||
|
height={largerThanMd ? 150 : 60}
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</Group>
|
</Group>
|
||||||
|
|||||||
Reference in New Issue
Block a user