mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-28 04:27:35 +02:00
remove unused component
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
import { Spinner } from "@chakra-ui/react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { getAllActive } from "../services/relays";
|
||||
|
||||
export const WaitForRelays = ({ min, children }) => {
|
||||
const [hide, setHide] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
const i = setInterval(async () => {
|
||||
if ((await getAllActive()).length > 0) {
|
||||
setHide(false);
|
||||
clearInterval(i);
|
||||
}
|
||||
}, 1000);
|
||||
}, [setHide]);
|
||||
|
||||
return hide ? <Spinner /> : <>{children}</>;
|
||||
};
|
Reference in New Issue
Block a user