Skip to content

Commit

Permalink
fix: ensure ParentProps is declared as a type import
Browse files Browse the repository at this point in the history
Fixes #1311
  • Loading branch information
paularmstrong committed Feb 6, 2024
1 parent ae6dc62 commit 60ffb92
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions packages/start/shared/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
import {
ErrorBoundary as DefaultErrorBoundary,
ParentProps,
} from "solid-js";
import { ErrorBoundary as DefaultErrorBoundary, type ParentProps } from "solid-js";
import { HttpStatusCode } from "./HttpStatusCode";
import { DevOverlay } from "./dev-overlay";

export function ErrorBoundary(props: ParentProps) {
if (import.meta.env.DEV) {
return (
<DevOverlay>
{props.children}
</DevOverlay>
);
return <DevOverlay>{props.children}</DevOverlay>;
}
return (
<DefaultErrorBoundary
fallback={(
<HttpStatusCode code={500} />
)}
>
<DefaultErrorBoundary fallback={<HttpStatusCode code={500} />}>
{props.children}
</DefaultErrorBoundary>
);
Expand Down

0 comments on commit 60ffb92

Please sign in to comment.