move error component to standalone
This commit is contained in:
parent
2b4aac7189
commit
5731ba62d0
6 changed files with 40 additions and 34 deletions
16
src/components/error/error.tsx
Normal file
16
src/components/error/error.tsx
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { Component, Show } from "solid-js";
|
||||
import css from './error.module.css';
|
||||
|
||||
export const ErrorComp: Component<{ error: Error }> = (props) => {
|
||||
return <div class={css.error}>
|
||||
<b>{props.error.message}</b>
|
||||
|
||||
<Show when={props.error.cause}>{
|
||||
cause => <>{cause().description}</>
|
||||
}</Show>
|
||||
|
||||
{props.error.stack}
|
||||
|
||||
<a href="/">Return to start</a>
|
||||
</div>;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue