Skip to content
Snippets Groups Projects
Verified Commit 64161ead authored by Andreas Ellewsen's avatar Andreas Ellewsen
Browse files

Use language fallback on sponsor page

parent 7dd5ba00
No related branches found
No related tags found
Loading
......@@ -22,7 +22,7 @@ import { useTranslation, Trans } from 'react-i18next'
import { Link } from 'react-router-dom'
import { Guest, Role } from 'interfaces'
import { isBefore } from 'date-fns'
import { getRoleName, getRoleOuName } from 'utils'
import SponsorGuestButtons from '../../components/sponsorGuestButtons'
interface GuestProps {
......@@ -118,7 +118,7 @@ const Status = ({ status }: StatusProps) => {
}
const PersonLine = ({ person, role }: PersonLineProps) => {
const [t, i18n] = useTranslation(['common'])
const [t] = useTranslation(['common'])
const today = new Date()
today.setHours(0, 0, 0, 0)
let status = ''
......@@ -140,13 +140,9 @@ const PersonLine = ({ person, role }: PersonLineProps) => {
<TableCell component="th" scope="row">
{`${person.first} ${person.last}`}
</TableCell>
<TableCell align="left">
{i18n.language === 'en' ? role.name_en : role.name_nb}
</TableCell>
<TableCell align="left">{getRoleName(role)}</TableCell>
<Status status={status} />
<TableCell align="left">
{i18n.language === 'en' ? role.ou_en : role.ou_nb}
</TableCell>
<TableCell align="left">{getRoleOuName(role)}</TableCell>
<TableCell align="left">
<Button
variant="contained"
......
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