Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
feat: change url and add skeleton object while loading
Browse files Browse the repository at this point in the history
  • Loading branch information
watchakorn-18k committed Jan 5, 2024
1 parent add31cf commit 98e110f
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,15 @@ import Skeleton from "./components/CardImage/Skeleton.tsx";
import CardImage from "./components/CardImage/CardImage.tsx";
import Footer from "./components/Footer/Footer.tsx";
import Navbar from "./components/Navbar/Navbar.tsx";
import { useTranslation } from "react-i18next";
import { Progress, Spinner } from "@material-tailwind/react";

export default function App() {
const { t } = useTranslation();
const [data, setData] = useState({
status_gen: false,
images: [],
prompt_text: "",
thumbnail: [],
status_erro: false,
});
const [value, setValue] = useState(0);
const [isRunning, setIsRunning] = useState(true);
const choices = [image_logo, image_logo_1, image_logo_2];
const [randomChoice] = useState(
Expand Down Expand Up @@ -61,12 +57,6 @@ export default function App() {
useEffect(() => {
let intervalId: NodeJS.Timeout;

if (isRunning) {
intervalId = setInterval(() => {
setValue((value) => (value + 0.1) % 100);
});
}

return () => clearInterval(intervalId);
}, [isRunning]);

Expand Down

0 comments on commit 98e110f

Please sign in to comment.