_500.tsx (625B)
1 import { ExceedingLimit } from "#core/domain/limiter.ts"; 2 import DelayedButton from "#http/islands/delayed_button.tsx"; 3 import { PageProps } from "$fresh/server.ts"; 4 5 export default function Error500Page({ url, error }: PageProps) { 6 if (error instanceof ExceedingLimit) { 7 return ( 8 <main class="container"> 9 <h1>Site spammed !</h1> 10 <DelayedButton href={url.href} delay={error.delay}> 11 Reload 12 </DelayedButton> 13 </main> 14 ); 15 } 16 17 return ( 18 <main class="container"> 19 <h1>Whops and error occured</h1> 20 <a href="/" class="button">Go homepage</a> 21 </main> 22 ); 23 }