Skip to content

Commit

Permalink
Updates next-auth + fixes ts issues with metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgingras committed Sep 4, 2024
1 parent 340a760 commit a5b98b1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/app/api/auth/[...nextauth]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,5 @@ const handler = NextAuth({
},
});

export { handler as GET, handler as POST };
export const { GET, POST } = handler.handlers;
// export { handler as GET, handler as POST };
2 changes: 1 addition & 1 deletion src/app/delegates/create/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Tenant from "@/lib/tenant/tenant";

export async function generateMetadata() {
const { ui } = Tenant.current();
const page = ui.page("delegates");
const page = ui.page("delegates") || ui.page("/");
const { title, description } = page!.meta;

const preview = `/api/images/og/delegates?title=${encodeURIComponent(
Expand Down
2 changes: 1 addition & 1 deletion src/app/delegates/edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Tenant from "@/lib/tenant/tenant";

export async function generateMetadata({}) {
const { ui } = Tenant.current();
const page = ui.page("delegates");
const page = ui.page("delegates") || ui.page("/");
const { title, description } = page!.meta;

const preview = `/api/images/og/delegates?title=${encodeURIComponent(
Expand Down
4 changes: 2 additions & 2 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ async function fetchGovernanceCalendar() {
}

export async function generateMetadata() {
const { ui, namespace } = Tenant.current();
const { ui } = Tenant.current();

const page = ui.page("proposals");
const page = ui.page("proposals") || ui.page("/");
const { title, description, imageTitle, imageDescription } = page!.meta;

const preview = `/api/images/og/proposals?title=${encodeURIComponent(
Expand Down
6 changes: 3 additions & 3 deletions src/pages/api_v1/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Head from "next/head";
import { Inter } from "next/font/google";
import SwaggerUI from "swagger-ui-react";
import "swagger-ui-react/swagger-ui.css";
// import SwaggerUI from "swagger-ui-react";
// import "swagger-ui-react/swagger-ui.css";

const inter = Inter({ subsets: ["latin"] });

Expand All @@ -18,7 +18,7 @@ export default function SpecUI() {
<link rel="icon" href="/favicon.ico" />
</Head>
<main className={`${inter.className}`}>
<SwaggerUI url="/api/v1/spec" />
{/* <SwaggerUI url="/api/v1/spec" /> */}
</main>
</>
);
Expand Down

0 comments on commit a5b98b1

Please sign in to comment.