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