fix: resolve runtime error
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
'use client';
|
||||
import SwaggerUI from 'swagger-ui-react';
|
||||
import 'swagger-ui-react/swagger-ui.css';
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
type Props = {
|
||||
spec: Record<string, any>,
|
||||
};
|
||||
|
||||
const SwaggerUI = dynamic(() => import('swagger-ui-react'), { ssr: false });
|
||||
|
||||
function Swagger({ spec }: Props) {
|
||||
return <SwaggerUI spec={spec} />;
|
||||
return <SwaggerUI spec={spec}/>;
|
||||
}
|
||||
|
||||
export default Swagger;
|
||||
Reference in New Issue
Block a user