Skip to content

Commit

Permalink
Update ReaderStatus.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Manwe-777 committed May 4, 2024
1 parent cceab64 commit 60ac29a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/views/settings/ReaderStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ function findMTGA(): boolean {
}

export default function ReaderStatus() {
const [daemonStatus, setDaemonStatus] = useState("warn");
const [readerStatus, setReaderStatus] = useState("warn");

useEffect(() => {
const interval = setInterval(() => {
const found = findMTGA();
if (found) {
setDaemonStatus("ok");
setReaderStatus("ok");
} else {
setDaemonStatus("err");
setReaderStatus("err");
}
}, 1000);
return () => clearInterval(interval);
Expand Down Expand Up @@ -45,7 +45,7 @@ export default function ReaderStatus() {
margin: "0 0 0 32px",
}}
/>
<div className={`log-status-${daemonStatus}`} />
<div className={`log-status-${readerStatus}`} />
</div>
</>
);
Expand Down

0 comments on commit 60ac29a

Please sign in to comment.