move error component to standalone
This commit is contained in:
parent
2b4aac7189
commit
5731ba62d0
6 changed files with 40 additions and 34 deletions
|
@ -1,8 +1,9 @@
|
|||
|
||||
import { ParentProps } from "solid-js";
|
||||
import { ErrorBoundary, ParentProps } from "solid-js";
|
||||
import { Menu } from "~/features/menu";
|
||||
import { createCommand } from "~/features/command";
|
||||
import { useNavigate } from "@solidjs/router";
|
||||
import { ErrorComp } from "~/components/error";
|
||||
|
||||
export default function Experimental(props: ParentProps) {
|
||||
const navigate = useNavigate();
|
||||
|
@ -19,6 +20,8 @@ export default function Experimental(props: ParentProps) {
|
|||
<Menu.Item command={goTo.withLabel('formatter').with('formatter')} />
|
||||
</Menu.Root>
|
||||
|
||||
{props.children}
|
||||
<ErrorBoundary fallback={e => <ErrorComp error={e} />}>
|
||||
{props.children}
|
||||
</ErrorBoundary>
|
||||
</>;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue