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'
|
import { BaseStyle } from './styles/base.tsx'
|
||||||
|
|
||||||
function Welcome(
|
function Welcome(
|
||||||
{ firstname, lastname, login }: {
|
{ firstname, lastname, login, endpoint }: {
|
||||||
firstname: string
|
firstname: string
|
||||||
lastname: string
|
lastname: string
|
||||||
login: string
|
login: string
|
||||||
|
endpoint?: string
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
|
@ -88,7 +89,12 @@ function Welcome(
|
||||||
<Container
|
<Container
|
||||||
style={{ width: '100%', textAlign: 'center', padding: '1rem' }}
|
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
|
Accéder à mon compte
|
||||||
</Button>
|
</Button>
|
||||||
</Container>
|
</Container>
|
||||||
|
@ -153,6 +159,13 @@ const template: Template<typeof Welcome, Parameters<typeof Welcome>[0]> = {
|
||||||
multiline: false,
|
multiline: false,
|
||||||
tag: 'login',
|
tag: 'login',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Endpoint',
|
||||||
|
description: 'Endpoint du lien "Accéder à mon compte"',
|
||||||
|
required: false,
|
||||||
|
multiline: false,
|
||||||
|
tag: 'endpoint',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
name: 'welcome',
|
name: 'welcome',
|
||||||
description: 'Coh@bit welcome mail for new users.',
|
description: 'Coh@bit welcome mail for new users.',
|
||||||
|
|
Loading…
Reference in a new issue