File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed
apps/typegpu-docs/src/components Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change 11import { useSetAtom } from 'jotai' ;
2- import type { MouseEvent } from 'react' ;
32import { currentExampleAtom } from '../utils/examples/currentExampleAtom.ts' ;
43import useEvent from '../utils/useEvent.ts' ;
4+ import { Button } from './design/Button.tsx' ;
55
66export function ExampleNotFound ( ) {
77 const setCurrentExample = useSetAtom ( currentExampleAtom ) ;
88
9- const handleGoHome = useEvent ( ( e : MouseEvent ) => {
10- e . preventDefault ( ) ;
11- setCurrentExample ( undefined ) ;
12- } ) ;
13-
149 return (
15- < div className = 'flex flex-1 flex-col items-center justify-center' >
16- < h1 className = 'font-bold text-4xl' > 404 Example Not Found</ h1 >
17- < button
18- type = 'button'
19- className = 'mt-4 text-lg text-slate-600 underline'
20- onClick = { handleGoHome }
10+ < div className = 'flex h-full flex-1 flex-col items-center justify-center gap-4' >
11+ < h1 className = 'font-bold text-3xl' >
12+ Example Not Found
13+ </ h1 >
14+ < Button
15+ accent
16+ onClick = { useEvent ( ( ) => {
17+ setCurrentExample ( undefined ) ;
18+ } ) }
2119 >
22- Go back home
23- </ button >
20+ Show default example
21+ </ Button >
2422 </ div >
2523 ) ;
2624}
You can’t perform that action at this time.
0 commit comments