@@ -104,19 +118,6 @@ export default function Navbar() {
)}
- {/*
-
- {({ active }) => (
-
- Space Base
-
- )}
-
- */}
@@ -179,6 +180,7 @@ export default function Navbar() {
active ? "bg-gray-100" : ""
}`}
role="menuitem"
+ onClick={signOut} // Trigger the sign-out on click
>
Logout
diff --git a/components/Projects/Auto/AI4Mars.tsx b/components/Projects/Auto/AI4Mars.tsx
index fa34d1a3..a094ce19 100644
--- a/components/Projects/Auto/AI4Mars.tsx
+++ b/components/Projects/Auto/AI4Mars.tsx
@@ -218,33 +218,6 @@ export function AiForMarsProject({
};
useEffect(() => {
- // async function fetchAnomaly() {
- // if (!session) {
- // setLoading(false);
- // return;
- // };
-
- // try {
- // const { data: anomalyData, error: anomalyError } = await supabase
- // .from("anomalies")
- // .select("*")
- // .eq("anomalySet", "automaton-aiForMars");
-
- // if (anomalyError) throw anomalyError;
-
- // const randomAnomaly = anomalyData[Math.floor(Math.random() * anomalyData.length)] as Anomaly;
- // setAnomaly(randomAnomaly);
- // setImageUrl(
- // `${process.env.NEXT_PUBLIC_SUPABASE_URL}/storage/v1/object/public/telescope/automaton-aiForMars/${randomAnomaly.id}.jpeg`
- // );
- // } catch (error: any) {
- // console.error("Error fetching anomaly", error.message);
- // setAnomaly(null);
- // } finally {
- // setLoading(false);
- // }
- // }
-
fetchAnomaly();
}, [session, supabase]);
@@ -267,23 +240,25 @@ export function AiForMarsProject({
const startTutorial = () => setShowTutorial(true);
return (
-
+
{!hasMission20000006 ? (
) : (
<>
{imageUrl && (
<>
-
+
+
+
{/*
*/}
@@ -314,4 +289,4 @@ export function AI4MWrapper() {
/>}
);
-};
\ No newline at end of file
+};
diff --git a/components/Structures/IndividualStructure.tsx b/components/Structures/IndividualStructure.tsx
index 8214e842..3beafd3b 100644
--- a/components/Structures/IndividualStructure.tsx
+++ b/components/Structures/IndividualStructure.tsx
@@ -219,7 +219,7 @@ const IndividualStructure: React.FC
= ({
{activeComponent && (
diff --git a/components/Structures/Missions/Astronomers/PlanetHunters/PlanetHunters.tsx b/components/Structures/Missions/Astronomers/PlanetHunters/PlanetHunters.tsx
index d934639f..ffcf2cff 100644
--- a/components/Structures/Missions/Astronomers/PlanetHunters/PlanetHunters.tsx
+++ b/components/Structures/Missions/Astronomers/PlanetHunters/PlanetHunters.tsx
@@ -251,81 +251,54 @@ const PlanetHuntersSteps = () => {
const maxChapter = Math.max(...steps.map(step => step.chapter));
return (
-
-
-
Chapter {currentChapter}
-
+
+
+
Chapter {currentChapter}
+
-
{`Level ${level} - ${experiencePoints} XP`}
+
{`Level ${level} - ${experiencePoints} XP`}
-
+
-
-
- {filteredSteps.slice(0, 2).map((step) => (
-
0 ? "bg-gray-700" : "bg-blue-500"
- }`}
- onClick={() => setSelectedMission(step)}
- >
-
-
-
{step.title}
-
{step.description}
+
+
+ {steps
+ .filter((step) => step.chapter === currentChapter)
+ .map((step) => (
+
setSelectedMission(step)}
+ >
+
+
+
{step.title}
+
{step.description}
+
-
-
Completed
-
{step.completedCount}
-
-
- ))}
+ ))}
-
-
- {filteredSteps.slice(2).map((step) => (
-
0 ? "bg-gray-700" : "bg-blue-500"
- }`}
- onClick={() => setSelectedMission(step)}
- >
-
-
-
{step.title}
-
{step.description}
-
-
-
Completed
-
{step.completedCount}
-
-
- ))}
-
-
{renderMission(tutorialMission)}
diff --git a/components/Structures/Missions/BasePlate.tsx b/components/Structures/Missions/BasePlate.tsx
index d7e95c68..be8483d0 100644
--- a/components/Structures/Missions/BasePlate.tsx
+++ b/components/Structures/Missions/BasePlate.tsx
@@ -69,14 +69,14 @@ const MissionShell = ({
setUsername(data.username);
setFirstName(data?.full_name);
setAvatarPreview(data?.avatar_url || "");
- }
- }
+ };
+ };
setLoading(false);
- }
+ };
if (session?.user?.id) {
getProfile();
- }
+ };
return () => {
ignore = true;
@@ -183,11 +183,11 @@ const MissionShell = ({
{currentChapter === 1 ? (
<>
-
+
{missions.slice(0, 2).map((mission) => renderMission(mission))}
-
+
{missions.slice(2).map((mission) => renderMission(mission))}
>
@@ -209,7 +209,7 @@ const MissionShell = ({
{selectedMission && (
setSelectedMission(null)}>Back
- {selectedMission.internalComponent &&
}
+ {selectedMission.internalComponent && (
+
{/* Add this wrapper */}
+
+
+ )}
)}