MCPcopy Create free account
hub / github.com/TanStack/query / ErrorPage

Function ErrorPage

examples/solid/contacts-solid-router/src/error-page.tsx:3–18  ·  view source on GitHub ↗
(props: { error: unknown })

Source from the content-addressed store, hash-verified

1import { createEffect } from 'solid-js'
2
3export default function ErrorPage(props: { error: unknown }) {
4 createEffect(() => console.error(props.error))
5
6 const errorMessage = () =>
7 props.error instanceof Error ? props.error.message : ''
8
9 return (
10 <div id="error-page">
11 <h1>Oops!</h1>
12 <p>Sorry, an unexpected error has occurred.</p>
13 <p>
14 <i>{errorMessage()}</i>
15 </p>
16 </div>
17 )
18}

Callers

nothing calls this directly

Calls 1

errorMessageFunction · 0.70

Tested by

no test coverage detected