···41 <p style={{ color: "#9f0" }}>Secret password accepted.</p>
42 <p>
43 {/* an <a> tag, not a <Link>, on purpose so we relaod for our role */}
44- <a className="button" href="/early">
45 Continue
46 </a>
47 </p>
···41 <p style={{ color: "#9f0" }}>Secret password accepted.</p>
42 <p>
43 {/* an <a> tag, not a <Link>, on purpose so we relaod for our role */}
44+ <a className="button" href="/early?hello">
45 Continue
46 </a>
47 </p>
+6-3
atproto-notifications/src/pages/Early.tsx
···1import { useCallback, useState } from 'react';
2-import { Link } from 'react-router';
3import { postJson } from '../components/Fetch';
4import './Early.css';
56export function Early({ }) {
07 const [notified, setNotified] = useState(false);
8 const [pushStatus, setPushStatus] = useState(null);
9 const [pushed, setPushed] = useState(false);
001011 const localTest = useCallback(() => {
12 try {
···49 <p>
50 To see a test notification, <button onClick={localTest}>click on this</button>. This is a local-only test.
51 </p>
52- {notified && (
53 <>
54 <p>
55 Then
···66 {pushStatus === 'failed' && <p>uh oh, something went wrong requesting a web push</p>}
67 </>
68 )}
69- {(pushed && pushStatus !== 'failed') && (
70 <>
71 <h3>Great!</h3>
72 <p>
···1import { useCallback, useState } from 'react';
2+import { Link, useSearchParams } from 'react-router';
3import { postJson } from '../components/Fetch';
4import './Early.css';
56export function Early({ }) {
7+ const [searchParams, _] = useSearchParams();
8 const [notified, setNotified] = useState(false);
9 const [pushStatus, setPushStatus] = useState(null);
10 const [pushed, setPushed] = useState(false);
11+12+ const returning = !searchParams.has('hello');
1314 const localTest = useCallback(() => {
15 try {
···52 <p>
53 To see a test notification, <button onClick={localTest}>click on this</button>. This is a local-only test.
54 </p>
55+ {(returning || notified) && (
56 <>
57 <p>
58 Then
···69 {pushStatus === 'failed' && <p>uh oh, something went wrong requesting a web push</p>}
70 </>
71 )}
72+ {(returning || (pushed && pushStatus !== 'failed')) && (
73 <>
74 <h3>Great!</h3>
75 <p>