mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
18 lines
355 B
JavaScript
18 lines
355 B
JavaScript
'use client'
|
|
|
|
import { notFound } from 'next/navigation'
|
|
import React from 'react'
|
|
|
|
export default function Page() {
|
|
const [notFoundEnabled, enableNotFound] = React.useState(false)
|
|
|
|
if (notFoundEnabled) {
|
|
notFound()
|
|
}
|
|
return (
|
|
<button onClick={() => React.startTransition(() => enableNotFound(true))}>
|
|
Not Found!
|
|
</button>
|
|
)
|
|
}
|