Refactor media upload handling in MediaPanel: remove direct upload logic and integrate useUploadStore for file enqueueing. Update translations for upload status and add UploadSnackbar component to display upload notifications in the UI.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { StrictMode } from 'react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
||||
import { QueryClientProvider } from '@tanstack/react-query'
|
||||
import { RouterProvider } from '@tanstack/react-router'
|
||||
import './index.css'
|
||||
import './shared/lib/i18n'
|
||||
@@ -8,6 +8,7 @@ import { ThemeProvider } from './theme/ThemeProvider'
|
||||
import { ToastProvider } from './shared/ui/toast-store'
|
||||
import { Toaster } from './shared/ui/toaster'
|
||||
import { router } from './router'
|
||||
import { queryClient } from './shared/api/query-client'
|
||||
import { setUnauthorizedHandler } from './shared/api/client'
|
||||
import { clearSession } from './features/auth/api'
|
||||
|
||||
@@ -15,8 +16,6 @@ import { clearSession } from './features/auth/api'
|
||||
// useRequireAuth/useRequireAdmin увидели user === null и сами увели на /login.
|
||||
setUnauthorizedHandler(clearSession)
|
||||
|
||||
const queryClient = new QueryClient()
|
||||
|
||||
createRoot(document.getElementById('root')!).render(
|
||||
<StrictMode>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
|
||||
Reference in New Issue
Block a user