fix snackbar provider
This commit is contained in:
parent
885bd8c911
commit
b800cbf880
@ -21,11 +21,17 @@ const localeText = ruRU.components.MuiLocalizationProvider.defaultProps.localeTe
|
|||||||
const root = createRoot(document.getElementById("root")!);
|
const root = createRoot(document.getElementById("root")!);
|
||||||
|
|
||||||
root.render(
|
root.render(
|
||||||
<SWRConfig value={{ revalidateOnFocus: false, shouldRetryOnError: false }}>
|
<SWRConfig value={{
|
||||||
|
revalidateOnFocus: false,
|
||||||
|
shouldRetryOnError: false,
|
||||||
|
}}>
|
||||||
<DndProvider backend={HTML5Backend}>
|
<DndProvider backend={HTML5Backend}>
|
||||||
<LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale="ru" localeText={localeText}>
|
<LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale="ru" localeText={localeText}>
|
||||||
<ThemeProvider theme={lightTheme}>
|
<ThemeProvider theme={lightTheme}>
|
||||||
<SnackbarProvider>
|
<SnackbarProvider
|
||||||
|
preventDuplicate={true}
|
||||||
|
style={{ backgroundColor: lightTheme.palette.brightPurple.main }}
|
||||||
|
>
|
||||||
<CssBaseline />
|
<CssBaseline />
|
||||||
<App />
|
<App />
|
||||||
</SnackbarProvider>
|
</SnackbarProvider>
|
||||||
|
|||||||
@ -1,15 +1,15 @@
|
|||||||
import { useState } from "react";
|
import UploadIcon from "@icons/UploadIcon";
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
ButtonBase,
|
ButtonBase,
|
||||||
useTheme,
|
|
||||||
Typography,
|
|
||||||
SxProps,
|
SxProps,
|
||||||
Theme,
|
Theme,
|
||||||
|
Typography,
|
||||||
|
useTheme,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { SnackbarProvider, enqueueSnackbar } from "notistack";
|
|
||||||
import UploadIcon from "@icons/UploadIcon";
|
|
||||||
import { useCurrentQuiz } from "@root/quizes/hooks";
|
import { useCurrentQuiz } from "@root/quizes/hooks";
|
||||||
|
import { enqueueSnackbar } from "notistack";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@ -108,9 +108,6 @@ export const DropZone = ({ text, sx, heightImg, widthImg }: Props) => {
|
|||||||
>
|
>
|
||||||
{text}
|
{text}
|
||||||
</Typography>
|
</Typography>
|
||||||
<SnackbarProvider
|
|
||||||
style={{ backgroundColor: theme.palette.brightPurple.main }}
|
|
||||||
/>
|
|
||||||
{quiz.config.startpage.background.desktop && (
|
{quiz.config.startpage.background.desktop && (
|
||||||
<img
|
<img
|
||||||
height={heightImg}
|
height={heightImg}
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
import { useEffect, useRef, useState } from "react";
|
import { Box, ButtonBase, SxProps, Theme, Typography, useTheme } from "@mui/material";
|
||||||
import { Box, ButtonBase, useTheme, Typography, SxProps, Theme } from "@mui/material";
|
|
||||||
import UploadIcon from "../../assets/icons/UploadIcon";
|
|
||||||
import { SnackbarProvider, enqueueSnackbar } from "notistack";
|
|
||||||
import Resizer from "@ui_kit/reactImageFileResizer";
|
import Resizer from "@ui_kit/reactImageFileResizer";
|
||||||
import JSZip from "jszip";
|
|
||||||
import saveAs from "file-saver";
|
import saveAs from "file-saver";
|
||||||
|
import JSZip from "jszip";
|
||||||
|
import { enqueueSnackbar } from "notistack";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import UploadIcon from "../../assets/icons/UploadIcon";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
text?: string;
|
text?: string;
|
||||||
@ -256,7 +256,6 @@ export default ({ text, sx, heightImg, widthImg }: Props) => {
|
|||||||
>
|
>
|
||||||
{text}
|
{text}
|
||||||
</Typography>
|
</Typography>
|
||||||
<SnackbarProvider style={{ backgroundColor: theme.palette.brightPurple.main }} />
|
|
||||||
{data ? (
|
{data ? (
|
||||||
<img
|
<img
|
||||||
height={heightImg}
|
height={heightImg}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user