import * as React from 'react' ; import type { LoaderFunction , ActionFunction } from 'remix' ; import { json , redirect , useLoaderData , Form } from 'remix' ; import type { KCDHandle } from '~/types' ; export const handle = { getSitemapEntries : ( ) => null , } ; type LoaderData = { } ; export const loader = async ( ) => { const data = { } ; return json ( data ) ; } ; export const action = async ( { request } ) => { return redirect ( new URL ( request . url ) . pathname ) ; } ; export default function GuestInfo ( ) { const data = useLoaderData < LoaderData > ( ) ; return ( < div > { `TODO: make this a thing...` } < pre > { JSON . stringify ( data , null , 2 ) } < /pre> < Form method = "post" noValidate > < button type = "submit" > submit < /button> < /Form> < /div>); } export function ErrorBoundary ( { error } ) { console . error ( error ) ; return ( < div > < h1 > Error < /h1> < pre > { error . stack } < /pre> < /div>); }