chore: update state initial loader

This commit is contained in:
Steven
2023-09-15 08:31:19 +08:00
parent f5802a7d82
commit 936fe5ac9d
7 changed files with 58 additions and 66 deletions

View File

@ -1,6 +1,6 @@
import { Option, Select } from "@mui/joy";
import { isEqual } from "lodash-es";
import { useEffect, useState } from "react";
import { useState } from "react";
import BetaBadge from "@/components/BetaBadge";
import Icon from "@/components/Icon";
import MobileHeader from "@/components/MobileHeader";
@ -28,12 +28,6 @@ const Setting = () => {
});
const isHost = isEqual(user.role, "HOST");
useEffect(() => {
if (!user) {
window.location.href = "/auth";
}
}, []);
const handleSectionSelectorItemClick = (settingSection: SettingSection) => {
setState({
selectedSection: settingSection,