-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove custom font from opengraph-image.tsx
- Loading branch information
1 parent
3ddbfdf
commit 925376e
Showing
39 changed files
with
1,254 additions
and
1,196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
import {NextRequest, NextResponse} from "next/server"; | ||
import { NextRequest, NextResponse } from "next/server"; | ||
|
||
import prisma from "@/lib/prisma"; | ||
|
||
export async function GET(req: NextRequest, context: { params: { id: string } }) { | ||
const id = context.params.id; | ||
export async function GET( | ||
req: NextRequest, | ||
context: { params: { id: string } }, | ||
) { | ||
const id = context.params.id; | ||
|
||
const quiz = await prisma.quiz.findUnique({ | ||
where: { | ||
id | ||
}, | ||
include: { | ||
words: true | ||
} | ||
}); | ||
console.log("loaded quiz with id: " + id) | ||
return NextResponse.json(quiz) | ||
} | ||
const quiz = await prisma.quiz.findUnique({ | ||
where: { | ||
id, | ||
}, | ||
include: { | ||
words: true, | ||
}, | ||
}); | ||
console.log("loaded quiz with id: " + id); | ||
return NextResponse.json(quiz); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,47 @@ | ||
import "./globals.css"; | ||
import {Analytics} from "@vercel/analytics/react"; | ||
import { Analytics } from "@vercel/analytics/react"; | ||
import Nav from "@/components/layout/nav"; | ||
import React from "react"; | ||
import {ThemeProvider} from "@/components/theme-provider"; | ||
import {inter, sfPro} from "@/app/fonts"; | ||
import {cx} from "class-variance-authority"; | ||
import { ThemeProvider } from "@/components/theme-provider"; | ||
import { inter, sfPro } from "@/app/fonts"; | ||
import { cx } from "class-variance-authority"; | ||
import { Toaster } from "@/components/ui/toaster"; | ||
|
||
export const metadata = { | ||
title: "NextQuiz", | ||
description: | ||
"NextQuiz is a quiz app built with Next.js, Prisma, and Tailwind CSS.", | ||
twitter: { | ||
card: "summary_large_image", | ||
title: "NextQuiz", | ||
description: | ||
"NextQuiz is a quiz app built with Next.js, Prisma, and Tailwind CSS.", | ||
twitter: { | ||
card: "summary_large_image", | ||
title: "NextQuiz", | ||
description: | ||
"NextQuiz is a quiz app built with Next.js, Prisma, and Tailwind CSS.", | ||
creator: "@davide_marcoli", | ||
}, | ||
metadataBase: new URL("https://next-quiz.davidemarcoli.dev"), | ||
themeColor: "#000000", | ||
"NextQuiz is a quiz app built with Next.js, Prisma, and Tailwind CSS.", | ||
creator: "@davide_marcoli", | ||
}, | ||
metadataBase: new URL("https://next-quiz.davidemarcoli.dev"), | ||
themeColor: "#000000", | ||
}; | ||
|
||
export default async function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return ( | ||
<> | ||
<html lang="en"> | ||
<body className={cx(sfPro.variable, inter.variable)}> | ||
<ThemeProvider attribute="class" defaultTheme="system" enableSystem> | ||
{/*<Suspense fallback="...">*/} | ||
{/* @ts-expect-error Server Component */} | ||
<Nav/> | ||
{/*</Suspense>*/} | ||
<main className={"mt-16 mx-4"}> | ||
{children} | ||
</main> | ||
<Toaster /> | ||
<Analytics/> | ||
</ThemeProvider> | ||
</body> | ||
</html> | ||
</> | ||
); | ||
return ( | ||
<> | ||
<html lang="en"> | ||
<body className={cx(sfPro.variable, inter.variable)}> | ||
<ThemeProvider attribute="class" defaultTheme="system" enableSystem> | ||
{/*<Suspense fallback="...">*/} | ||
{/* @ts-expect-error Server Component */} | ||
<Nav /> | ||
{/*</Suspense>*/} | ||
<main className={"mx-4 mt-16"}>{children}</main> | ||
<Toaster /> | ||
<Analytics /> | ||
</ThemeProvider> | ||
</body> | ||
</html> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
import ListQuiz from "@/app/quiz/list/page"; | ||
|
||
export default async function Home() { | ||
|
||
|
||
return ( | ||
<> | ||
{/* @ts-expect-error Server Component */} | ||
<ListQuiz /> | ||
</> | ||
<> | ||
{/* @ts-expect-error Server Component */} | ||
<ListQuiz /> | ||
</> | ||
); | ||
} |
Oops, something went wrong.