Skip to content
Snippets Groups Projects
Commit 0e0d0608 authored by Tore.Brede's avatar Tore.Brede
Browse files

Getting rid of TODO by making link configurable

parent 3034f6f5
No related branches found
No related tags found
1 merge request!156Getting rid of TODO by making link configurable
Pipeline #100565 passed
...@@ -6,7 +6,14 @@ import { useHistory } from 'react-router-dom' ...@@ -6,7 +6,14 @@ import { useHistory } from 'react-router-dom'
import ArrowBackIcon from '@mui/icons-material/ArrowBack' import ArrowBackIcon from '@mui/icons-material/ArrowBack'
import ArrowForwardIcon from '@mui/icons-material/ArrowForward' import ArrowForwardIcon from '@mui/icons-material/ArrowForward'
export default function OverviewGuestButton() { interface OverviewGuestButtonProperties {
backArrow?: string
}
export default function OverviewGuestButton(
properties: OverviewGuestButtonProperties
) {
const { backArrow } = properties
const { t } = useTranslation(['common']) const { t } = useTranslation(['common'])
const history = useHistory() const history = useHistory()
...@@ -23,8 +30,15 @@ export default function OverviewGuestButton() { ...@@ -23,8 +30,15 @@ export default function OverviewGuestButton() {
justifyContent: 'space-evenly', justifyContent: 'space-evenly',
}} }}
> >
{/* TODO Where should the back arrow point to? */} {backArrow !== undefined ? (
<ArrowBackIcon /> <ArrowBackIcon
onClick={() => {
history.push(backArrow)
}}
/>
) : (
<ArrowBackIcon visibility="hidden" />
)}
<Box <Box
sx={{ display: 'flex', flexDirection: 'column', alignItems: 'center' }} sx={{ display: 'flex', flexDirection: 'column', alignItems: 'center' }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment