feat(template): allow to customize endpoint
for Welcome
template
This commit is contained in:
parent
5476c9d6a6
commit
2a372f5320
|
@ -16,10 +16,11 @@ import { bodyCss, messageCss, rootCss, textCss } from './styles/base.tsx'
|
|||
import { BaseStyle } from './styles/base.tsx'
|
||||
|
||||
function Welcome(
|
||||
{ firstname, lastname, login }: {
|
||||
{ firstname, lastname, login, endpoint }: {
|
||||
firstname: string
|
||||
lastname: string
|
||||
login: string
|
||||
endpoint?: string
|
||||
},
|
||||
) {
|
||||
return (
|
||||
|
@ -88,7 +89,12 @@ function Welcome(
|
|||
<Container
|
||||
style={{ width: '100%', textAlign: 'center', padding: '1rem' }}
|
||||
>
|
||||
<Button href='https://cohabit.fr/profil' style={buttonCss}>
|
||||
<Button
|
||||
href={(endpoint && endpoint.length > 1)
|
||||
? endpoint
|
||||
: 'https://cohabit.fr/profil'}
|
||||
style={buttonCss}
|
||||
>
|
||||
Accéder à mon compte
|
||||
</Button>
|
||||
</Container>
|
||||
|
@ -153,6 +159,13 @@ const template: Template<typeof Welcome, Parameters<typeof Welcome>[0]> = {
|
|||
multiline: false,
|
||||
tag: 'login',
|
||||
},
|
||||
{
|
||||
name: 'Endpoint',
|
||||
description: 'Endpoint du lien "Accéder à mon compte"',
|
||||
required: false,
|
||||
multiline: false,
|
||||
tag: 'endpoint',
|
||||
},
|
||||
],
|
||||
name: 'welcome',
|
||||
description: 'Coh@bit welcome mail for new users.',
|
||||
|
|
Loading…
Reference in a new issue