Skip to content
Snippets Groups Projects
Commit 4cc423bd authored by elg's avatar elg
Browse files

Merge branch 'GREG-75-invitation-page' into 'master'

Greg 75 invitation page

See merge request !117
parents 630d1c54 9334c06c
No related branches found
No related tags found
1 merge request!117Greg 75 invitation page
Pipeline #98074 passed
{
"description": "Please choose how you want to log in to complete your registration. The recommended way is to log in with either Feide or ID-porten. If that is not possible you can manually fill out the registration form with your passport number.",
"header": "Guest Registration",
"login": "Log in with FEIDE",
"manual": "Registrate manually"
}
{
"description": "Vennligst velg hvordan du vil logge inn for å fullføre registreringen. Den anbefalte metoden er å logge inn gjennom Feide eller ID-porten. Dersom det ikke er mulig kan du fylle ut registreringskjemaet manuelt med passnummer",
"header": "Gjestetjenesten",
"login": "Logg inn med FEIDE",
"manual": "Registrer manuelt"
}
{
"description": "Ver venleg og vel korleis du vil logge inn for å fullføre registreringa. Den anbefalte metoden er å logge inn gjennom Feide eller ID-porten. Dersom det ikkje er mogeleg kan du fylle ut registreringskjemaet manuelt med passnummer",
"header": "Gjestetjenesten",
"login": "Logg inn med FEIDE",
"manual": "Registrer manuelt"
}
...@@ -8,7 +8,11 @@ interface IHrefButton { ...@@ -8,7 +8,11 @@ interface IHrefButton {
function HrefButton({ to, children }: IHrefButton) { function HrefButton({ to, children }: IHrefButton) {
return ( return (
<Button variant="contained" href={to} sx={{ backgroundColor: '#18191C' }}> <Button
variant="contained"
href={to}
sx={{ backgroundColor: 'theme.palette.secondary' }}
>
{children} {children}
</Button> </Button>
) )
......
import React from 'react'
import { Button } from '@mui/material'
interface IHrefButton {
to: string
children: React.ReactNode
}
function HrefLineButton({ to, children }: IHrefButton) {
return (
<Button href={to} sx={{ color: 'theme.palette.secondary' }}>
{children}
</Button>
)
}
// eslint-disable-next-line import/prefer-default-export
export { HrefLineButton }
import { useTranslation } from 'react-i18next'
import Page from 'components/page' import Page from 'components/page'
import { useUserContext } from 'contexts'
import { Link } from 'react-router-dom' import { styled } from '@mui/material/styles'
import { HrefButton } from 'components/button'
import { HrefLineButton } from 'components/button/linebutton'
const FlexDiv = styled('div')(() => ({
display: 'flex',
gap: '0.5rem',
}))
function Invite() { function Invite() {
const { user } = useUserContext() const { t } = useTranslation(['invite'])
return ( return (
<Page> <Page>
<h1>{t('header')}</h1>
<p> <p>
{user.first_name} {user.last_name} {t('description')}
TODO: Put information about login options, and buttons to them on this
page
</p> </p>
After login or when clicking on the manual registration option, the user <FlexDiv>
should be sent here: <HrefButton to="/oidc/authenticate/">{t('login')}</HrefButton>
<Link to="/guestregister/">Guest Registration</Link> <HrefLineButton to="/guestregister/">{t('manual')}</HrefLineButton>
</FlexDiv>
</Page> </Page>
) )
} }
......
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