Skip to content

Commit

Permalink
Désactive le lien "Contactez le support" du dialogue "mot de passe ou…
Browse files Browse the repository at this point in the history
…blié"
  • Loading branch information
marc-rutkowski committed Mar 5, 2024
1 parent d714e43 commit 00a52b9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/site/app/auth/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const LoginPage = () => {
<LoginModal
defaultValues={defaultValues}
// TODO: intégrer crisp dans le site pour pouvoir le raccorder ici
onOpenChatbox={() => {}}
//onOpenChatbox={() => {}}
{...state}
/>
);
Expand Down
8 changes: 5 additions & 3 deletions packages/ui/src/components/auth/Login/ForgottenPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ export const ForgottenPassword = (props: LoginPropsWithState) => {
/>
</Field>

<Button type="button" variant="underlined" onClick={onOpenChatbox}>
Contactez le support !
</Button>
{onOpenChatbox && (
<Button type="button" variant="underlined" onClick={onOpenChatbox}>
Contactez le support !
</Button>
)}
{error && (
<FieldMessage messageClassName="mt-4" state="error" message={error} />
)}
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/auth/Login/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export type LoginProps = {
/** Fonction appelée à l'annulation du formulaire */
onCancel: () => void;
/** Fonction appelée lors du clic sur le bouton "contactez le support" */
onOpenChatbox: () => void;
onOpenChatbox?: () => void;
/** Pour contrôler la robustesse des mots de passe */
getPasswordStrength: (
password: string,
Expand Down

0 comments on commit 00a52b9

Please sign in to comment.