Skip to content

Commit

Permalink
remove layout component
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-wellick committed Sep 19, 2024
1 parent 7afaebc commit 3b4b892
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
14 changes: 10 additions & 4 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { serveStatic } from "@hono/node-server/serve-static";
import { swaggerUI } from "@hono/swagger-ui";
import leagues from "./services/leagues";
import teams from "./services/teams";
import Layout from "./views/layout";
import { swaggerDoc } from "../doc/swaggerDoc";
import { jsxRenderer } from "hono/jsx-renderer";
import Navbar from "./views/components/navbar";

const app = new Hono();

Expand Down Expand Up @@ -40,16 +40,22 @@ app.use(
{
docType:
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
},
),
}
)
);

// api documentation
app.get("/doc", (c) => c.json(swaggerDoc));
app.get("/ui", swaggerUI({ url: "/doc" }));

// routes
app.get("/", (c) => c.render(<Layout />));
app.get("/", (c) =>
c.render(
<>
<Navbar />
</>
)
);
app.route("api/v1/leagues", leagues);
app.route("api/v1/teams", teams);

Expand Down
14 changes: 0 additions & 14 deletions src/views/layout.tsx

This file was deleted.

0 comments on commit 3b4b892

Please sign in to comment.