fix: build error
This commit is contained in:
parent
7d36f8af88
commit
8aa86bbe64
@ -14,7 +14,7 @@ import { handle } from "hono/vercel";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export const app = new OpenAPIHono().basePath("/api");
|
||||
const app = new OpenAPIHono().basePath("/api");
|
||||
|
||||
declare module "hono" {
|
||||
interface ContextVariableMap {
|
||||
|
@ -7,33 +7,35 @@ import _SwaggerUI from "swagger-ui-react";
|
||||
import "swagger-ui-react/swagger-ui.css";
|
||||
|
||||
// Create the layout component
|
||||
class AugmentingLayout extends React.Component {
|
||||
render() {
|
||||
const { getComponent } = this.props;
|
||||
const BaseLayout = getComponent("BaseLayout", true);
|
||||
return (
|
||||
<div className="not-prose">
|
||||
<BaseLayout />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
// class AugmentingLayout extends React.Component {
|
||||
// render() {
|
||||
// const { getComponent } = this.props;
|
||||
// const BaseLayout = getComponent("BaseLayout", true);
|
||||
// return (
|
||||
// <div className="not-prose">
|
||||
// <BaseLayout />
|
||||
// </div>
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
const AugmentingLayoutPlugin = () => {
|
||||
return {
|
||||
components: {
|
||||
AugmentingLayout: AugmentingLayout,
|
||||
},
|
||||
};
|
||||
};
|
||||
// const AugmentingLayoutPlugin = () => {
|
||||
// return {
|
||||
// components: {
|
||||
// AugmentingLayout: AugmentingLayout,
|
||||
// },
|
||||
// };
|
||||
// };
|
||||
|
||||
export default function SwaggerUI(props: ComponentProps<typeof _SwaggerUI>) {
|
||||
return (
|
||||
<div className="not-prose">
|
||||
<_SwaggerUI
|
||||
{...props}
|
||||
persistAuthorization={true}
|
||||
plugins={[AugmentingLayoutPlugin]}
|
||||
layout="AugmentingLayout"
|
||||
// plugins={[AugmentingLayoutPlugin]}
|
||||
// layout="AugmentingLayout"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user