mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-29 11:15:42 +08:00
Deleted unused useEffect
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { Container } from "@chakra-ui/react";
|
||||
import Head from "next/head";
|
||||
import { useEffect } from "react";
|
||||
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
|
||||
import { Task } from "src/components/Tasks/Task";
|
||||
import { useGenericTaskAPI } from "src/hooks/tasks/useGenericTaskAPI";
|
||||
@@ -8,12 +7,6 @@ import { useGenericTaskAPI } from "src/hooks/tasks/useGenericTaskAPI";
|
||||
const RandomTask = () => {
|
||||
const { tasks, isLoading, trigger, reset } = useGenericTaskAPI("random");
|
||||
|
||||
useEffect(() => {
|
||||
if (tasks.length === 0) {
|
||||
reset();
|
||||
}
|
||||
}, [tasks, reset]);
|
||||
|
||||
if (isLoading) {
|
||||
return <LoadingScreen text="Loading..." />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user