-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'About the student' block (#2667)
* added AboutUserBlock * added AboutStudentBlock * fixed lint
- Loading branch information
Showing
11 changed files
with
121 additions
and
29 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
8 changes: 0 additions & 8 deletions
8
src/containers/user-profile/about-tutor-block/AboutTutorBlock.constants.ts
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
src/containers/user-profile/about-user-block/AboutStudentBlock.tsx
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,23 @@ | ||
import { useTranslation } from 'react-i18next' | ||
|
||
import AboutUserBlock from '~/containers/user-profile/about-user-block/AboutUserBlock' | ||
import { | ||
aboutStudentKeys, | ||
aboutStudentData | ||
} from '~/containers/user-profile/about-user-block/about-user-block.constants' | ||
import { UserRoleEnum } from '~/types' | ||
|
||
const AboutStudentBlock = () => { | ||
const { t } = useTranslation() | ||
|
||
return ( | ||
<AboutUserBlock | ||
data={aboutStudentData} | ||
itemKeys={aboutStudentKeys} | ||
title={t('userProfilePage.studentAbout.title')} | ||
userRole={UserRoleEnum.Student} | ||
/> | ||
) | ||
} | ||
|
||
export default AboutStudentBlock |
25 changes: 25 additions & 0 deletions
25
src/containers/user-profile/about-user-block/AboutTutorBlock.tsx
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,25 @@ | ||
import { FC } from 'react' | ||
import { useTranslation } from 'react-i18next' | ||
|
||
import AboutUserBlock from '~/containers/user-profile/about-user-block/AboutUserBlock' | ||
import { aboutTutorKeys } from '~/containers/user-profile/about-user-block/about-user-block.constants' | ||
import { UserRoleEnum, ProfessionalBlock } from '~/types' | ||
|
||
interface AboutTutorBlockProps { | ||
data: ProfessionalBlock | ||
} | ||
|
||
const AboutTutorBlock: FC<AboutTutorBlockProps> = ({ data }) => { | ||
const { t } = useTranslation() | ||
|
||
return ( | ||
<AboutUserBlock | ||
data={data} | ||
itemKeys={aboutTutorKeys} | ||
title={t('userProfilePage.tutorAbout.title')} | ||
userRole={UserRoleEnum.Tutor} | ||
/> | ||
) | ||
} | ||
|
||
export default AboutTutorBlock |
File renamed without changes.
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
21 changes: 21 additions & 0 deletions
21
src/containers/user-profile/about-user-block/about-user-block.constants.ts
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,21 @@ | ||
import { AboutStudentData, ProfessionalBlock } from '~/types' | ||
|
||
export const aboutStudentKeys: Array<keyof AboutStudentData> = [ | ||
'personalIntroduction', | ||
'learningGoals', | ||
'learningActivities' | ||
] | ||
|
||
export const aboutStudentData: AboutStudentData = { | ||
personalIntroduction: 'Test personal introduction.', | ||
learningGoals: | ||
'My primary goal is to become proficient in Python programming within the next six months, focusing on data analysis and automation.', | ||
learningActivities: 'Some learning activities.' | ||
} | ||
|
||
export const aboutTutorKeys: Array<keyof ProfessionalBlock> = [ | ||
'education', | ||
'workExperience', | ||
'scientificActivities', | ||
'awards' | ||
] |
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