remove db loaded toast
Some checks failed
Deploy Website / deploy (push) Has been cancelled

This commit is contained in:
Lee 2024-10-09 17:32:58 +01:00
parent 598b6881e8
commit 5be22493fa

@ -18,7 +18,6 @@ type DatabaseLoaderProps = {
}; };
export default function DatabaseLoader({ children }: DatabaseLoaderProps) { export default function DatabaseLoader({ children }: DatabaseLoaderProps) {
const { toast } = useToast();
const [database, setDatabase] = useState<Database | undefined>(undefined); const [database, setDatabase] = useState<Database | undefined>(undefined);
useEffect(() => { useEffect(() => {
@ -28,12 +27,8 @@ export default function DatabaseLoader({ children }: DatabaseLoaderProps) {
db.on("ready", () => { db.on("ready", () => {
const loadTime = (performance.now() - before).toFixed(0); const loadTime = (performance.now() - before).toFixed(0);
console.log(`Loaded database in ${loadTime}ms`); console.log(`Loaded database in ${loadTime}ms`);
toast({
title: "Database loaded",
description: `The database was loaded in ${loadTime}ms.`,
});
}); });
}, [toast]); }, []);
return ( return (
<DatabaseContext.Provider value={database}> <DatabaseContext.Provider value={database}>