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:
Leonid Pershin
2026-07-24 22:25:01 +03:00
parent 2523808e3b
commit 8f8ce5122a
7 changed files with 188 additions and 53 deletions
+2 -3
View File
@@ -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}>