fix: add displayName on withServerSideDocument

This commit is contained in:
p-sw 2024-07-20 02:29:10 +09:00
parent 7251bf2400
commit 13cc43de2e

View File

@ -4,13 +4,15 @@ import { ServerSideDocumentFallback } from "./ssrFallback";
function withServerSideDocument<P extends {}>(
Component: ComponentType<P>,
): ComponentType<P> {
return (props) => {
const SSDocumentFallbackWrapper = (props: P) => {
return (
<ServerSideDocumentFallback>
<Component {...props} />
</ServerSideDocumentFallback>
);
};
return SSDocumentFallbackWrapper;
}
export { withServerSideDocument };