visuddhinanda 2 роки тому
батько
коміт
12d4eb6b73
1 змінених файлів з 4 додано та 2 видалено
  1. 4 2
      dashboard/src/components/general/ThemeSelect.tsx

+ 4 - 2
dashboard/src/components/general/ThemeSelect.tsx

@@ -1,4 +1,4 @@
-import { Button, Dropdown, MenuProps, Switch } from "antd";
+import { Button, Dropdown, MenuProps } from "antd";
 import { useEffect, useState } from "react";
 import { useIntl } from "react-intl";
 import { ThemeOutlinedIcon } from "../../assets/icon";
@@ -7,7 +7,7 @@ import store from "../../store";
 
 const ThemeSelectWidget = () => {
   const intl = useIntl();
-  const [theme, setTheme] = useState<string>();
+  const [theme, setTheme] = useState<string>("ant");
 
   const items: MenuProps["items"] = [
     {
@@ -29,6 +29,8 @@ const ThemeSelectWidget = () => {
     const currTheme = localStorage.getItem("theme");
     if (currTheme) {
       setTheme(currTheme);
+    } else {
+      setTheme("ant");
     }
   }, []);