-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b62fcec
commit 72bd48a
Showing
4 changed files
with
95 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* This file is part of NER's FinishLine and licensed under GNU AGPLv3. | ||
* See the LICENSE file in the repository root folder for details. | ||
*/ | ||
|
||
import { Typography } from '@mui/material'; | ||
import PageLayout from '../../components/PageLayout'; | ||
import { AuthenticatedUser } from 'shared'; | ||
|
||
interface GuestHomePageProps { | ||
user: AuthenticatedUser; | ||
} | ||
|
||
const GuestHomePage = ({ user }: GuestHomePageProps) => { | ||
return ( | ||
<PageLayout title="Home" hidePageTitle> | ||
<Typography variant="h3" marginLeft="auto" sx={{ marginTop: 2, textAlign: 'center', pt: 3, padding: 0 }}> | ||
Welcome, {user.firstName}! | ||
</Typography> | ||
</PageLayout> | ||
); | ||
}; | ||
|
||
export default GuestHomePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* This file is part of NER's FinishLine and licensed under GNU AGPLv3. | ||
* See the LICENSE file in the repository root folder for details. | ||
*/ | ||
|
||
import { Typography } from '@mui/material'; | ||
import OverdueWorkPackageAlerts from './OverdueWorkPackageAlerts'; | ||
import UsefulLinks from './UsefulLinks'; | ||
import WorkPackagesByTimelineStatus from './WorkPackagesByTimelineStatus'; | ||
import UpcomingDeadlines from './UpcomingDeadlines'; | ||
import { useSingleUserSettings } from '../../hooks/users.hooks'; | ||
import LoadingIndicator from '../../components/LoadingIndicator'; | ||
import ErrorPage from '../ErrorPage'; | ||
import PageLayout from '../../components/PageLayout'; | ||
import { AuthenticatedUser } from 'shared'; | ||
|
||
interface MemberHomePageProps { | ||
user: AuthenticatedUser; | ||
} | ||
|
||
const MemberHomePage = ({ user }: MemberHomePageProps) => { | ||
const { isLoading, isError, error, data: userSettingsData } = useSingleUserSettings(user.userId); | ||
|
||
if (isLoading || !userSettingsData) return <LoadingIndicator />; | ||
if (isError) return <ErrorPage error={error} message={error.message} />; | ||
|
||
return ( | ||
<PageLayout title="Home" hidePageTitle> | ||
<Typography variant="h3" marginLeft="auto" sx={{ marginTop: 2, textAlign: 'center', pt: 3, padding: 0 }}> | ||
Welcome, {user.firstName}! | ||
</Typography> | ||
<OverdueWorkPackageAlerts /> | ||
<UsefulLinks /> | ||
<UpcomingDeadlines /> | ||
<WorkPackagesByTimelineStatus /> | ||
</PageLayout> | ||
); | ||
}; | ||
|
||
export default MemberHomePage; |