Skip to content

Commit

Permalink
refactor: fix styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Siumauricio committed Jun 23, 2024
1 parent 608db3d commit e8a4611
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pages/swagger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ const SwaggerUI = dynamic(() => import("swagger-ui-react"), { ssr: false });

const Home: NextPage = () => {
const { data } = api.settings.getOpenApiDocument.useQuery();
console.log(data);

if (!data) {
return <div>Loading...</div>;
}
return <SwaggerUI spec={data} />;
return (
<div className="h-screen bg-white">
<SwaggerUI spec={data || {}} />
</div>
);
};

export default Home;
Expand All @@ -31,7 +31,6 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
},
};
}
// Fetch data from external API
const helpers = createServerSideHelpers({
router: appRouter,
ctx: {
Expand Down
5 changes: 5 additions & 0 deletions styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,9 @@
background-color: white;
}

.swagger-ui .info{
margin: 0px !important;
padding-top: 1rem !important;
}

}

0 comments on commit e8a4611

Please sign in to comment.