Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions app/gallery/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { useSession } from 'next-auth/react';
import { useState, useEffect, useMemo } from 'react';
import { useState, useEffect, useMemo, Suspense } from 'react';
import Header from '@/components/common/Header';
import ImageWithFallback from '@/components/common/ImageWithFallback';
import Icon from '@hackclub/icons';
Expand Down Expand Up @@ -61,7 +61,7 @@ const isValidImageUrl = (url: string): boolean => {
return imageExtensions.some(ext => lowerUrl.includes(ext));
};

export default function Gallery() {
function GalleryInner() {
const { data: session, status } = useSession();
const { isIslandMode, isLoading: isExperienceModeLoading } = useExperienceMode();
const [projects, setProjects] = useState<Project[]>([]);
Expand Down Expand Up @@ -649,4 +649,12 @@ export default function Gallery() {
</main>
</div>
);
}
}

export default function Gallery() {
return (
<Suspense fallback={<div className="min-h-screen bg-gray-50 flex items-center justify-center"><p className="text-gray-600">Loading...</p></div>}>
<GalleryInner />
</Suspense>
);
}
12 changes: 7 additions & 5 deletions app/map/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import { ReactNode } from 'react';
import { ReactNode, Suspense } from 'react';
import { SessionProvider } from 'next-auth/react';
import Header from "@/components/common/Header";
import { useSession } from "next-auth/react";
Expand Down Expand Up @@ -35,10 +35,12 @@ function SessionWrapper({ children }: { children: ReactNode }) {

return (
<div className="min-h-screen flex flex-col">
<Header
session={session}
status={status}
/>
<Suspense fallback={<div />}>
<Header
session={session}
status={status}
/>
</Suspense>
<main className="flex-grow container mx-auto p-6">
<div className="min-h-screen flex items-center justify-center">
<div className="text-center max-w-md p-8 bg-white rounded-lg shadow-md">
Expand Down
12 changes: 10 additions & 2 deletions app/map/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import {useEffect, useState} from 'react';
import {useEffect, useState, Suspense} from 'react';
import {useSession} from 'next-auth/react';
import {useRouter} from 'next/navigation';
import Icon from '@hackclub/icons';
Expand Down Expand Up @@ -30,7 +30,7 @@ async function fetchFlights() {
return res.json();
}

export default function MapPage() {
function MapInner() {
const {data: session, status} = useSession();
const [flights, setFlights] = useState<FlightData[]>([]);
const [error, setError] = useState<string | null>(null);
Expand Down Expand Up @@ -122,4 +122,12 @@ export default function MapPage() {
</div>
</div>
);
}

export default function MapPage() {
return (
<Suspense fallback={<div className="min-h-screen bg-gray-50 flex items-center justify-center"><p className="text-gray-600">Loading...</p></div>}>
<MapInner />
</Suspense>
);
}
Loading