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