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 {}>( function withServerSideDocument<P extends {}>(
Component: ComponentType<P>, Component: ComponentType<P>,
): ComponentType<P> { ): ComponentType<P> {
return (props) => { const SSDocumentFallbackWrapper = (props: P) => {
return ( return (
<ServerSideDocumentFallback> <ServerSideDocumentFallback>
<Component {...props} /> <Component {...props} />
</ServerSideDocumentFallback> </ServerSideDocumentFallback>
); );
}; };
return SSDocumentFallbackWrapper;
} }
export { withServerSideDocument }; export { withServerSideDocument };