-
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.
changed the way and places where study material access is displayed (#…
…2839) * changed the way and places where study material access is displayed * removed comments
- Loading branch information
1 parent
7422ce0
commit 2e12072
Showing
4 changed files
with
46 additions
and
26 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
34 changes: 34 additions & 0 deletions
34
src/containers/my-cooperations/cooperation-completion/StudyMaterials.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,34 @@ | ||
import { useState } from 'react' | ||
|
||
import SettingItem from '~/components/setting-item/SettingItem' | ||
import AppSelect from '~/components/app-select/AppSelect' | ||
import { useTranslation } from 'react-i18next' | ||
import { styles } from '~/containers/my-cooperations/cooperation-completion/CooperationCompletion.styles' | ||
|
||
import { cooperationAccessValues } from '~/containers/my-cooperations/cooperation-completion/CooperationCompletion.constants' | ||
import { CooperationMaterialsAccessEnum } from '~/types' | ||
|
||
const StudyMaterials = () => { | ||
const { t } = useTranslation() | ||
|
||
const [materialsAccess, setMaterialsAccess] = | ||
useState<CooperationMaterialsAccessEnum>( | ||
CooperationMaterialsAccessEnum.OneMonthAccess | ||
) | ||
|
||
return ( | ||
<SettingItem | ||
subtitle={t('cooperationsPage.cooperationDetails.accessDescription')} | ||
title={t('cooperationsPage.cooperationDetails.accessTitle')} | ||
> | ||
<AppSelect | ||
fields={cooperationAccessValues(t)} | ||
setValue={setMaterialsAccess} | ||
sx={styles.dropdown} | ||
value={materialsAccess} | ||
/> | ||
</SettingItem> | ||
) | ||
} | ||
|
||
export default StudyMaterials |
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