-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Create base layout for assessment page * Apply base assessment layout to assessment welcome page * Remove notification center from loading screen * Eslint fixes --------- Co-authored-by: Viktor Riabkov <[email protected]>
- Loading branch information
1 parent
85e9cd7
commit bdeac58
Showing
4 changed files
with
149 additions
and
123 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import { PropsWithChildren } from 'react'; | ||
|
||
import Box from '@mui/material/Box'; | ||
|
||
import { AssessmentLayoutFooter } from './AssessmentLayoutFooter'; | ||
import { AssessmentLayoutHeader } from './AssessmentLayoutHeader'; | ||
|
||
import { Theme } from '~/shared/constants'; | ||
import { NotificationCenter } from '~/shared/ui'; | ||
|
||
type Props = PropsWithChildren<{ | ||
activityName: string; | ||
progress: number; | ||
|
||
isPublic: boolean; | ||
publicAppletKey: string | null; | ||
|
||
appletId: string; | ||
activityId: string; | ||
eventId: string; | ||
|
||
footerActions?: React.ReactNode; | ||
}>; | ||
|
||
export const AssessmentLayout = (props: Props) => { | ||
return ( | ||
<Box | ||
id="assessment-screen-layout" | ||
display="flex" | ||
flex={1} | ||
flexDirection="column" | ||
bgcolor={Theme.colors.light.surface} | ||
> | ||
<AssessmentLayoutHeader | ||
title={props.activityName} | ||
progress={props.progress} | ||
appletId={props.appletId} | ||
activityId={props.activityId} | ||
eventId={props.eventId} | ||
isPublic={props.isPublic} | ||
publicKey={props.isPublic ? props.publicAppletKey : null} | ||
/> | ||
|
||
<Box | ||
id="assessment-content-container" | ||
display="flex" | ||
flex={1} | ||
flexDirection="column" | ||
overflow="scroll" | ||
> | ||
<NotificationCenter /> | ||
<Box display="flex" flex={1} justifyContent="center"> | ||
{props.children} | ||
</Box> | ||
</Box> | ||
|
||
<AssessmentLayoutFooter>{props.footerActions}</AssessmentLayoutFooter> | ||
</Box> | ||
); | ||
}; |
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
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