feat: implement new SnackBar design (#5515)

Closes #5383

## Light theme

<img width="905" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/ab0683c5-ded3-420c-ace6-684d38794a2d">

## Dark theme

<img width="903" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/4e43ca35-438d-4ba0-8388-1f061c6ccfb0">
This commit is contained in:
Thaïs
2024-05-23 12:19:50 +02:00
committed by GitHub
parent 453525ca25
commit 8019ba8782
53 changed files with 485 additions and 552 deletions

View File

@ -7,6 +7,7 @@ import { Form } from '@/auth/sign-in-up/hooks/useSignInUpForm';
import { useReadCaptchaToken } from '@/captcha/hooks/useReadCaptchaToken';
import { useRequestFreshCaptchaToken } from '@/captcha/hooks/useRequestFreshCaptchaToken';
import { AppPath } from '@/types/AppPath';
import { SnackBarVariant } from '@/ui/feedback/snack-bar-manager/components/SnackBar';
import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
import { useIsMatchingLocation } from '~/hooks/useIsMatchingLocation';
@ -75,7 +76,7 @@ export const useSignInUp = (form: UseFormReturn<Form>) => {
},
onError: (error) => {
enqueueSnackBar(`${error.message}`, {
variant: 'error',
variant: SnackBarVariant.Error,
});
},
onCompleted: (data) => {
@ -124,7 +125,7 @@ export const useSignInUp = (form: UseFormReturn<Form>) => {
navigateAfterSignInUp(currentWorkspace, currentWorkspaceMember);
} catch (err: any) {
enqueueSnackBar(err?.message, {
variant: 'error',
variant: SnackBarVariant.Error,
});
}
},