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:
@ -1,6 +1,7 @@
|
||||
import React, { useCallback, useEffect } from 'react';
|
||||
|
||||
import { ObjectMetadataItemNotFoundError } from '@/object-metadata/errors/ObjectMetadataNotFoundError';
|
||||
import { SnackBarVariant } from '@/ui/feedback/snack-bar-manager/components/SnackBar';
|
||||
import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
|
||||
|
||||
export const PromiseRejectionEffect = () => {
|
||||
@ -15,12 +16,12 @@ export const PromiseRejectionEffect = () => {
|
||||
enqueueSnackBar(
|
||||
`Error with custom object that cannot be found : ${event.reason}`,
|
||||
{
|
||||
variant: 'error',
|
||||
variant: SnackBarVariant.Error,
|
||||
},
|
||||
);
|
||||
} else {
|
||||
enqueueSnackBar(`Error: ${event.reason}`, {
|
||||
variant: 'error',
|
||||
variant: SnackBarVariant.Error,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user