diff --git a/client/pages/Community.tsx b/client/pages/Community.tsx index 7e414a26..74d6179d 100644 --- a/client/pages/Community.tsx +++ b/client/pages/Community.tsx @@ -1,4 +1,4 @@ -import { useState, useEffect } from "react"; +import { useState, useEffect, useRef } from "react"; import Layout from "@/components/Layout"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; @@ -26,11 +26,15 @@ import { export default function Community() { const [isLoading, setIsLoading] = useState(true); + const toastShownRef = useRef(false); useEffect(() => { const timer = setTimeout(() => { setIsLoading(false); - aethexToast.system("Community hub connected"); + if (!toastShownRef.current) { + aethexToast.system("Community hub connected"); + toastShownRef.current = true; + } }, 1000); return () => clearTimeout(timer);