mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-21 19:00:13 +01:00
feat(Toast): add Toast nearly identical to ChatGPT's (#1108)
This commit is contained in:
parent
ba5ab86037
commit
81a90d245b
10 changed files with 281 additions and 3 deletions
|
|
@ -1,8 +1,10 @@
|
|||
import { RecoilRoot } from 'recoil';
|
||||
import * as RadixToast from '@radix-ui/react-toast';
|
||||
import { RouterProvider } from 'react-router-dom';
|
||||
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
|
||||
import { QueryClient, QueryClientProvider, QueryCache } from '@tanstack/react-query';
|
||||
import { ScreenshotProvider, ThemeProvider, useApiErrorBoundary } from './hooks';
|
||||
import Toast from './components/ui/Toast';
|
||||
import { router } from './routes';
|
||||
|
||||
const App = () => {
|
||||
|
|
@ -22,8 +24,12 @@ const App = () => {
|
|||
<QueryClientProvider client={queryClient}>
|
||||
<RecoilRoot>
|
||||
<ThemeProvider>
|
||||
<RouterProvider router={router} />
|
||||
<ReactQueryDevtools initialIsOpen={false} position="top-right" />
|
||||
<RadixToast.Provider>
|
||||
<RouterProvider router={router} />
|
||||
<ReactQueryDevtools initialIsOpen={false} position="top-right" />
|
||||
<Toast />
|
||||
<RadixToast.Viewport className="pointer-events-none fixed inset-0 z-[60] mx-auto my-2 flex max-w-[560px] flex-col items-stretch justify-start md:pb-5" />
|
||||
</RadixToast.Provider>
|
||||
</ThemeProvider>
|
||||
</RecoilRoot>
|
||||
</QueryClientProvider>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue