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

16 lines
316 B
TypeScript
Raw Permalink Normal View History

2023-08-25 07:11:33 +00:00
"use client";
2024-12-13 16:37:20 +01:00
import { ReactNode } from "react";
2023-08-25 07:11:33 +00:00
import dynamic from "next/dynamic";
2024-12-13 16:37:20 +01:00
type ClientOnlyProps = { children: ReactNode };
2023-08-25 07:11:33 +00:00
const ClientOnly = (props: ClientOnlyProps) => {
const { children } = props;
return children;
};
export default dynamic(() => Promise.resolve(ClientOnly), {
ssr: false,
});