Files
blitzkit/packages/website/src/hocs/withErrorWrapper.tsx
T
2026-08-30 14:26:08 -05:00

15 lines
340 B
TypeScript

import type { ReactNode } from "react";
import { ErrorWrapper } from "../components/ErrorWrapper";
export function withErrorWrapper<Props extends object>(
Component: (props: Props) => ReactNode,
) {
return function (props: Props) {
return (
<ErrorWrapper>
<Component {...props} />
</ErrorWrapper>
);
};
}