Skip to content

Commit dbdd53f

Browse files
committed
add patrons page
1 parent 7900c8d commit dbdd53f

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import TestFlightGate from "@/components/TestFlightGate";
2+
3+
export const metadata = {
4+
title: "Join TestFlight Patrons | iFly",
5+
description: "Access the iFly TestFlight build for patrons.",
6+
robots: {
7+
index: false,
8+
follow: false,
9+
},
10+
};
11+
12+
export default function TestFlightPatronsPage() {
13+
return <TestFlightGate testflightUrl="https://testflight.apple.com/join/dpDcf8Ua" skipGate={true} />;
14+
}

src/components/TestFlightGate.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,21 @@ const STORAGE_KEY = "ifly_testflight_gate_passed";
1616

1717
interface TestFlightGateProps {
1818
testflightUrl?: string;
19+
skipGate?: boolean;
1920
}
2021

21-
export default function TestFlightGate({ testflightUrl }: TestFlightGateProps = {}) {
22+
export default function TestFlightGate({ testflightUrl, skipGate }: TestFlightGateProps = {}) {
2223
const TESTFLIGHT_URL = testflightUrl || DEFAULT_TESTFLIGHT_URL;
2324
const [gatePassed, setGatePassed] = useState<boolean>(false);
2425
const [checking, setChecking] = useState<boolean>(true);
2526

2627
useEffect(() => {
2728
try {
2829
const stored = typeof window !== "undefined" ? window.localStorage.getItem(STORAGE_KEY) : null;
29-
setGatePassed(stored === "true");
30+
setGatePassed(stored === "true" || skipGate === true);
3031
} catch {}
3132
setChecking(false);
32-
}, []);
33+
}, [skipGate]);
3334

3435
function markPassed(method: "follow" | "skip") {
3536
try {

0 commit comments

Comments
 (0)