@@ -3,7 +3,7 @@ import type { Message } from 'ai';
33import { useChat } from '@ai-sdk/react' ;
44import { useAnimate } from 'framer-motion' ;
55import { memo , useCallback , useEffect , useRef , useState } from 'react' ;
6- import { cssTransition , toast , ToastContainer } from 'react-toastify' ;
6+ import { toast } from 'react-toastify' ;
77import { useMessageParser , usePromptEnhancer , useShortcuts } from '~/lib/hooks' ;
88import { description , useChatHistory } from '~/lib/persistence' ;
99import { chatStore } from '~/lib/stores/chat' ;
@@ -29,11 +29,6 @@ import type { TextUIPart, FileUIPart, Attachment } from '@ai-sdk/ui-utils';
2929import { useMCPStore } from '~/lib/stores/mcp' ;
3030import type { LlmErrorAlertType } from '~/types/actions' ;
3131
32- const toastAnimation = cssTransition ( {
33- enter : 'animated fadeInRight' ,
34- exit : 'animated fadeOutRight' ,
35- } ) ;
36-
3732const logger = createScopedLogger ( 'Chat' ) ;
3833
3934export function Chat ( ) {
@@ -56,34 +51,6 @@ export function Chat() {
5651 importChat = { importChat }
5752 />
5853 ) }
59- < ToastContainer
60- closeButton = { ( { closeToast } ) => {
61- return (
62- < button className = "Toastify__close-button" onClick = { closeToast } >
63- < div className = "i-ph:x text-lg" />
64- </ button >
65- ) ;
66- } }
67- icon = { ( { type } ) => {
68- /**
69- * @todo Handle more types if we need them. This may require extra color palettes.
70- */
71- switch ( type ) {
72- case 'success' : {
73- return < div className = "i-ph:check-bold text-bolt-elements-icon-success text-2xl" /> ;
74- }
75- case 'error' : {
76- return < div className = "i-ph:warning-circle-bold text-bolt-elements-icon-error text-2xl" /> ;
77- }
78- }
79-
80- return undefined ;
81- } }
82- position = "bottom-right"
83- pauseOnFocusLoss
84- transition = { toastAnimation }
85- autoClose = { 3000 }
86- />
8754 </ >
8855 ) ;
8956}
0 commit comments