import _dynamic from 'next/dynamic' ; param componentImport param loadingComponent example export const dynamic = < T extends ( ) => any > ( componentImport , loadingComponent ? ) => { return _dynamic ( componentImport , { ssr : true , loading : loadingComponent ? loadingComponent : function Loading ( ) { return < > < />; } } ) as Await < ReturnType < T > > ; } ; param componentImport param loadingComponent example export const dynamicCSR = < T extends ( ) => any > ( componentImport , loadingComponent ? ) => { return _dynamic ( componentImport , { ssr : false , loading : loadingComponent ? loadingComponent : function Loading ( ) { return < > < />; } } ) as Await < ReturnType < T > > ; } ; /**
 * Await 처리 된 타입을 가져오는 헬퍼 타입입니다.
 */ export type Await < T > = T extends { then ( onfulfilled ? ) : unknown ; } ? U : T ;