add divider between links in the Profession component

This commit is contained in:
Dawid Wysokiński 2021-03-27 10:28:42 +01:00
parent 11df56b5e2
commit a9b620073d
1 changed files with 22 additions and 19 deletions

View File

@ -44,26 +44,28 @@ const Profession = ({ profession }: ProfessionProps) => {
{qualification.name} ({qualification.code})
</strong>{' '}
-&gt;{' '}
{QUESTIONS.map(howManyQuestions => {
{QUESTIONS.map((howManyQuestions, index) => {
return (
<Link
key={howManyQuestions}
href={{
pathname: Route.TestPage,
query: {
slug: qualification.slug,
questions: howManyQuestions,
},
}}
>
Test {howManyQuestions}{' '}
{polishPlurals(
'pytanie',
'pytania',
'pytań',
howManyQuestions
)}{' '}
</Link>
<span key={howManyQuestions}>
<Link
href={{
pathname: Route.TestPage,
query: {
slug: qualification.slug,
questions: howManyQuestions,
},
}}
>
Test {howManyQuestions}{' '}
{polishPlurals(
'pytanie',
'pytania',
'pytań',
howManyQuestions
)}
</Link>
{index + 1 !== QUESTIONS.length ? ' | ' : ''}
</span>
);
})}
</Typography>
@ -86,6 +88,7 @@ const Profession = ({ profession }: ProfessionProps) => {
const useStyles = makeStyles(theme => {
return {
accordionDetails: {
flexDirection: 'column',
'& > *:not(:last-child)': {
marginBottom: theme.spacing(1),
},