From 5f5f5dce05915b9069c1e97c58ea2335148612df Mon Sep 17 00:00:00 2001 From: Gizmotronn Date: Fri, 6 Dec 2024 20:50:54 +0800 Subject: [PATCH] =?UTF-8?q?=EF=B8=8F=F0=9F=93=8A=F0=9F=8E=86=20=E2=86=9D?= =?UTF-8?q?=20[SSG-84=20SSG-81]:=20AI4M=20fixed=20on=20prod/staging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Projects/Auto/AI4Mars.tsx | 50 ++++++++++++++-------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/components/Projects/Auto/AI4Mars.tsx b/components/Projects/Auto/AI4Mars.tsx index 6437cc43..90311b5e 100644 --- a/components/Projects/Auto/AI4Mars.tsx +++ b/components/Projects/Auto/AI4Mars.tsx @@ -156,40 +156,40 @@ export function AiForMarsProject() { const [hasMission20000006, setHasMission20000006] = useState(null); - useEffect(() => { - const checkTutorialMission = async () => { - if (!session) return; + // useEffect(() => { + // const checkTutorialMission = async () => { + // if (!session) return; - try { - const { data: missionData, error: missionError } = await supabase - .from('missions') - .select('id') - .eq('user', session.user.id) - .eq('mission', '20000006') - .limit(1); + // try { + // const { data: missionData, error: missionError } = await supabase + // .from('missions') + // .select('id') + // .eq('user', session.user.id) + // .eq('mission', '20000006') + // .limit(1); - if (missionError) { - console.error("Error fetching mission data:", missionError); - setHasMission20000006(false); - return; - }; + // if (missionError) { + // console.error("Error fetching mission data:", missionError); + // setHasMission20000006(false); + // return; + // }; - setHasMission20000006(missionData && missionData.length > 0); - } catch (error) { - console.error("Error checking user mission: ", error); - setHasMission20000006(false); - }; - }; + // setHasMission20000006(missionData && missionData.length > 0); + // } catch (error) { + // console.error("Error checking user mission: ", error); + // setHasMission20000006(false); + // }; + // }; - checkTutorialMission(); - }, [session, supabase]); + // checkTutorialMission(); + // }, [session, supabase]); useEffect(() => { async function fetchAnomaly() { if (!session) { setLoading(false); return; - } + }; try { const { data: anomalyData, error: anomalyError } = await supabase @@ -212,7 +212,7 @@ export function AiForMarsProject() { }; }; - if (session && hasMission20000006) { + if (session) { // && hasMission20000006) { fetchAnomaly(); }; }, [session, hasMission20000006, supabase]);