Skip to content

Commit

Permalink
feat: Add greeting on dashboard page
Browse files Browse the repository at this point in the history
  • Loading branch information
JeangelLF committed Oct 14, 2024
1 parent 81b5de5 commit 77f30de
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pages/pupil/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { Lecture } from '../../gql/graphql';
import DisableableButton from '../../components/DisablebleButton';
import { useRoles } from '../../hooks/useApollo';
import ConfirmationModal from '@/modals/ConfirmationModal';
import { Typography } from '@/components/Typography';

type Props = {};

Expand Down Expand Up @@ -220,6 +221,11 @@ const Dashboard: React.FC<Props> = () => {
{!called || (loading && <CenterLoadingSpinner />)}
{called && !loading && (
<VStack paddingX={space['1']} marginX="auto" width="100%" maxWidth={ContainerWidth}>
<div>
<Typography className="mb-4" variant="h3" as="p">
{t('hallo')} {data?.me.firstname}&nbsp;&nbsp;👋
</Typography>
</div>
<ImportantInformation variant="dark" />
<VStack>
<NextAppointmentCard appointments={data?.me?.appointments as Lecture[]} />
Expand Down
6 changes: 6 additions & 0 deletions src/pages/student/DashboardStudent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import NextAppointmentCard from '../../widgets/NextAppointmentCard';
import { Lecture } from '../../gql/graphql';
import useApollo from '../../hooks/useApollo';
import { useUserType } from '../../hooks/useApollo';
import { Typography } from '@/components/Typography';

type Props = {};

Expand Down Expand Up @@ -228,6 +229,11 @@ const DashboardStudent: React.FC<Props> = () => {
{!called || (loading && <CenterLoadingSpinner />)}
{called && !loading && (
<VStack paddingX={space['1']} marginX="auto" width="100%" maxWidth={ContainerWidth}>
<div>
<Typography variant="h3" as="p">
{t('hallo')} {data?.me.firstname}&nbsp;&nbsp;👋
</Typography>
</div>
<VStack>
<VStack marginBottom={space['1.5']}>
<ImportantInformation variant="normal" />
Expand Down

0 comments on commit 77f30de

Please sign in to comment.