mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* Page meta tags are not generated on the server Fixes #2730 * suppress warnings about critical dependencies in Next.js logs
21 lines
345 B
TypeScript
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);
|