cloudflare/vinext

Public

mirrored from https://github.com/cloudflare/vinextAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v0.0.9

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

examples/app-router-playground/app/error/error.tsx

23lines · modecode

1'use client';
2
3import { Boundary } from '#/ui/boundary';
4import Button from '#/ui/button';
5import React from 'react';
6
7export default function Error({ error, reset }: any) {
8 React.useEffect(() => {
9 console.log('logging error:', error);
10 }, [error]);
11
12 return (
13 <Boundary label="error.tsx" color="red">
14 <div className="flex flex-col gap-4">
15 <h1 className="text-xl font-semibold text-gray-300">Error</h1>
16 <div className="text-sm text-gray-500">{error?.message}</div>
17 <div className="flex">
18 <Button onClick={() => reset()}>Try Again</Button>
19 </div>
20 </div>
21 </Boundary>
22 );
23}
24