fixes & spin global icon

This commit is contained in:
2024-04-20 17:59:17 +03:00
parent f80431aba0
commit 227f1c5782
2 changed files with 15 additions and 11 deletions

View File

@ -1,12 +1,14 @@
import React, { ReactNode } from "react";
import { useSelector } from "react-redux";
import { StorePrototype } from "./store";
import { ConfigProvider } from "antd";
import { ConfigProvider, Spin } from "antd";
import { darkTheme, lightTheme } from "./style";
import PropTypes from "prop-types";
import { LoadingOutlined } from "@ant-design/icons";
const ThemeProviderWrapper = ({ children }: { children: ReactNode }) => {
const theme = useSelector((state: StorePrototype) => state.settings.theme);
Spin.setDefaultIndicator(<LoadingOutlined style={{ fontSize: 36 }} spin />);
return (
<ConfigProvider theme={theme === "dark" ? darkTheme : lightTheme}>