This commit is contained in:
Ren Amamiya
2023-09-30 15:12:33 +07:00
parent 09b3eeda99
commit a2e3247432
27 changed files with 414 additions and 199 deletions

19
src/app/relays/relay.tsx Normal file
View File

@@ -0,0 +1,19 @@
import { Suspense } from 'react';
import { Await, useLoaderData } from 'react-router-dom';
export function RelayScreen() {
const data: { relay?: { [key: string]: string } } = useLoaderData();
return (
<div>
<Suspense fallback={<p>Loading...</p>}>
<Await
resolve={data.relay}
errorElement={<div>Could not load relay information 😬</div>}
>
{(resolvedRelay) => <p>{JSON.stringify(resolvedRelay)}</p>}
</Await>
</Suspense>
</div>
);
}