From e9a2b2676818ec40a8243061aeec3031bba94db3 Mon Sep 17 00:00:00 2001 From: Ovgodd Date: Fri, 25 Sep 2026 11:08:26 +0200 Subject: [PATCH] =?UTF-8?q?fixup!=20=F0=9F=92=84(frontend)=20redesign=2040?= =?UTF-8?q?1=20error=20standalone=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../features/auth/components/ButtonLogin.tsx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/frontend/apps/impress/src/features/auth/components/ButtonLogin.tsx b/src/frontend/apps/impress/src/features/auth/components/ButtonLogin.tsx index 3268e83be..fd1299663 100644 --- a/src/frontend/apps/impress/src/features/auth/components/ButtonLogin.tsx +++ b/src/frontend/apps/impress/src/features/auth/components/ButtonLogin.tsx @@ -1,5 +1,5 @@ import { Button } from '@gouvfr-lasuite/ui-components'; -import { ReactNode } from 'react'; +import { type ComponentProps } from 'react'; import { useTranslation } from 'react-i18next'; import { css } from 'styled-components'; @@ -10,20 +10,15 @@ import { LOGIN_URL } from '../conf'; import { useAuth } from '../hooks'; import { gotoLogin } from '../utils'; -type ButtonLoginProps = { - href?: string; - variant?: 'primary' | 'tertiary'; - children?: ReactNode; -}; +type ButtonLoginProps = ComponentProps; export const ButtonLogin = ({ href = LOGIN_URL, - variant = 'primary', children, + ...props }: ButtonLoginProps) => { const { t } = useTranslation(); const { authenticated } = useAuth(); - const label = children ?? t('Sign in'); if (authenticated) { return null; @@ -31,14 +26,14 @@ export const ButtonLogin = ({ return ( ); };