Files
explore/ui/shared/layout/components/Root.tsx
T
tom goriunovandGitHub 9719bc2952 Page meta tags are not generated on the server (#2731)
* Page meta tags are not generated on the server

Fixes #2730

* suppress warnings about critical dependencies in Next.js logs
2025-05-15 18:24:55 +02:00

21 lines
345 B
TypeScript

import React from 'react';
import useIsMounted from 'lib/hooks/useIsMounted';
interface Props {
children: React.ReactNode;
content: React.ReactNode;
}
const Root = ({ children, content }: Props) => {
const isMounted = useIsMounted();
if (!isMounted) {
return content;
}
return children;
};
export default React.memo(Root);