-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
52 Adding course codes to review & evaluation page (#112)
* Reviewer document title now is course code * Always refresh document title whenever unit code changes * added unit code to title for coordinator page * revert to old dev 2x * import react only once * add review title to review finish page * usepagetitle hook added * added evaluation header to reviews * added course code to evaluation page * remove duplicate header * lint fixes * reverted reviewerbottomnavigation changes * lint fix Co-authored-by: Frinze Erin Lapuz <44391389+frinzekt@users.noreply.github.com>
- Loading branch information
1 parent
a599972
commit dff7554
Showing
9 changed files
with
67 additions
and
7 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,14 @@ | ||
import Container from '@mui/material/Container'; | ||
import CardHeader from '@mui/material/CardHeader'; | ||
|
||
interface EvaluationHeaderProps { | ||
title: string; | ||
} | ||
|
||
const EvaluationHeader = ({ title }: EvaluationHeaderProps) => ( | ||
<Container sx={{ textAlign: 'center' }}> | ||
<CardHeader title={title} /> | ||
</Container> | ||
); | ||
|
||
export default EvaluationHeader; |
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,9 @@ | ||
import { useEffect } from 'react'; | ||
|
||
const usePageTitle = (title: string) => { | ||
useEffect(() => { | ||
document.title = title; | ||
}, [title]); | ||
}; | ||
|
||
export default usePageTitle; |
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 |
---|---|---|
@@ -1,10 +1,20 @@ | ||
import SectionTabs from '@/components/CourseEvaluation/SectionTabs'; | ||
import BodyCard from '@/components/utils/BodyCard'; | ||
import useCourseEvaluation from '@/components/hooks/useCourseEvaluation'; | ||
import usePageTitle from '@/components/hooks/usePageTitle'; | ||
import EvaluationHeader from '@/components/Custom/EvaluationHeader'; | ||
|
||
const Post = () => ( | ||
<BodyCard> | ||
<SectionTabs /> | ||
</BodyCard> | ||
); | ||
const Post = () => { | ||
const { courseEvaluation } = useCourseEvaluation(); | ||
|
||
usePageTitle(`${courseEvaluation.unit_code} Manage`); | ||
|
||
return ( | ||
<BodyCard> | ||
<EvaluationHeader title={courseEvaluation.unit_code} /> | ||
<SectionTabs /> | ||
</BodyCard> | ||
); | ||
}; | ||
|
||
export default Post; |
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
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