link-stack/apps/link/app/(main)/_components/ClientOnly.tsx

15 lines
283 B
TypeScript
Raw Normal View History

2023-08-25 07:11:33 +00:00
"use client";
import dynamic from "next/dynamic";
type ClientOnlyProps = { children: JSX.Element };
const ClientOnly = (props: ClientOnlyProps) => {
const { children } = props;
return children;
};
export default dynamic(() => Promise.resolve(ClientOnly), {
ssr: false,
});