Skip to content

Commit

Permalink
added constants file and replaced Main Cooperation Wrapper for Labels…
Browse files Browse the repository at this point in the history
… to styles
  • Loading branch information
amoutens committed Nov 21, 2024
1 parent 43c70ef commit 730ebd2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const studentLabelsPercentage = [0, 25, 50, 75, 100]
export const tutorLabelsPercentage = [0, 20, 40, 60, 80, 100]
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,8 @@ export const styles = {
wrapperTitleWithIconCoop: {
display: 'flex',
alignItems: 'center'
},
wrapperMainLabelForCoop: {
width: '100%'
}
}
11 changes: 7 additions & 4 deletions src/components/app-progress-bar-line/AppProgressBarLine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import useBreakpoints from '~/hooks/use-breakpoints'
import { styles } from '~/components/app-progress-bar-line/AppProgressBarLine.styles'
import { LinearProgress } from '@mui/material'
import { UserRoleEnum } from '~/types'

import {
studentLabelsPercentage,
tutorLabelsPercentage
} from './AppProgressBarLine.constans'
import { AccessTime } from '@mui/icons-material'
import { useTranslation } from 'react-i18next'
interface AppProgressBarLineProps {
Expand All @@ -24,10 +27,10 @@ const AppProgressBarLine: FC<AppProgressBarLineProps> = ({
const { t } = useTranslation()
const labelsValue =
userRole === UserRoleEnum.Student
? [0, 25, 50, 75, 100]
: [0, 20, 40, 60, 80, 100]
? studentLabelsPercentage
: tutorLabelsPercentage
const labelsWithPercentForCooperation = (
<Box width={'100%'}>
<Box sx={styles.wrapperMainLabelForCoop}>
<Typography sx={styles.primaryLabelsCoop} variant='body2'>
{t('cooperationDetailsPage.progressBar.yourProgress')}
</Typography>
Expand Down

0 comments on commit 730ebd2

Please sign in to comment.