mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### What
Change the shared test component to async since it's used in both
server/client components. Found this error while testing other stuff,
it's because the async shared component is accidentally used in client
component page
```
===== TS errors =====
[Test Mode] ./app/client/edge/page.tsx:5:23
Type error: 'ErrorComponent' cannot be used as a JSX component.
Its type '({ name }: { name: string; }) => Promise<any>' is not a valid JSX element type.
```
5 lines
119 B
TypeScript
5 lines
119 B
TypeScript
export function ErrorComponent({ name }: { name: string }) {
|
|
throw new Error('Custom error:' + name)
|
|
return null
|
|
}
|