mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-20 01:06:11 +01:00
feat: /client transition to @librechat/client
This commit is contained in:
parent
63a5902404
commit
b71a82d0e9
347 changed files with 913 additions and 771 deletions
|
|
@ -1,21 +0,0 @@
|
|||
import { createContext, useContext } from 'react';
|
||||
import type { TShowToast } from '~/common';
|
||||
import useToast from '~/hooks/useToast';
|
||||
|
||||
type ToastContextType = {
|
||||
showToast: ({ message, severity, showIcon, duration }: TShowToast) => void;
|
||||
};
|
||||
|
||||
export const ToastContext = createContext<ToastContextType>({
|
||||
showToast: () => ({}),
|
||||
});
|
||||
|
||||
export function useToastContext() {
|
||||
return useContext(ToastContext);
|
||||
}
|
||||
|
||||
export default function ToastProvider({ children }) {
|
||||
const { showToast } = useToast();
|
||||
|
||||
return <ToastContext.Provider value={{ showToast }}>{children}</ToastContext.Provider>;
|
||||
}
|
||||
|
|
@ -1,11 +1,9 @@
|
|||
export { default as AssistantsProvider } from './AssistantsContext';
|
||||
export { default as AgentsProvider } from './AgentsContext';
|
||||
export { default as ToastProvider } from './ToastContext';
|
||||
export * from './ActivePanelContext';
|
||||
export * from './AgentPanelContext';
|
||||
export * from './ChatContext';
|
||||
export * from './ShareContext';
|
||||
export * from './ToastContext';
|
||||
export * from './FileMapContext';
|
||||
export * from './AddedChatContext';
|
||||
export * from './EditorContext';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue