seperate regular

This commit is contained in:
2023-04-26 23:19:42 +08:00
parent 6d2c0d8cb3
commit 89124b9ad9
7 changed files with 71 additions and 10 deletions

View File

@@ -35,6 +35,7 @@ const downloadObjectAsJson = (exportObj: any, exportName: string) => {
const Timetable = ({
user,
isRegular = false,
disableNetwork = false,
disableConflictCheck = false,
replaceInputType = "checkbox",
@@ -221,7 +222,7 @@ const Timetable = ({
}
};
React.useEffect(() => {
if (disableNetwork) return;
if (disableNetwork || isRegular) return;
const interval = setInterval(() => {
refresh();
@@ -233,7 +234,7 @@ const Timetable = ({
React.useEffect(() => {
const main = async () => {
const json = await get("/api/html");
const json = await get(isRegular ? "/api/html-regular" : "/api/html");
ref.current.innerHTML = json.html;
handleInput({ target: ref.current });
refresh();