completionId: cgen-328d1618bdaa43a8b403296fd641872a

cgen-328d1618bdaa43a8b403296fd641872a
This commit is contained in:
Builder.io 2025-11-13 05:55:11 +00:00
parent 0a6d6c5cd2
commit d3a45639d2

View file

@ -16,11 +16,12 @@ import {
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useEffect, useState, useRef } from "react"; import { useEffect, useState, useRef } from "react";
import LoadingScreen from "@/components/LoadingScreen"; import LoadingScreen from "@/components/LoadingScreen";
import { aethexToast } from "@/lib/aethex-toast"; import { useArmToast } from "@/hooks/use-arm-toast";
export default function Labs() { export default function Labs() {
const navigate = useNavigate(); const navigate = useNavigate();
const { theme } = useArmTheme(); const { theme } = useArmTheme();
const armToast = useArmToast();
const [isLoading, setIsLoading] = useState(true); const [isLoading, setIsLoading] = useState(true);
const toastShownRef = useRef(false); const toastShownRef = useRef(false);
@ -28,13 +29,13 @@ export default function Labs() {
const timer = setTimeout(() => { const timer = setTimeout(() => {
setIsLoading(false); setIsLoading(false);
if (!toastShownRef.current) { if (!toastShownRef.current) {
aethexToast.system("Labs mainframe linked"); armToast.system("Labs mainframe linked");
toastShownRef.current = true; toastShownRef.current = true;
} }
}, 900); }, 900);
return () => clearTimeout(timer); return () => clearTimeout(timer);
}, []); }, [armToast]);
if (isLoading) { if (isLoading) {
return ( return (