Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
DATABASE_URL=""
DATABASE_POOLER_URL=""
DATABASE_POOLER_URL=""
CLERK_SECRET_KEY=""
CLERK_WEBHOOK_SIGNING_SECRET=""
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=""
NEXT_PUBLIC_CLERK_SIGN_IN_URL="/login"
NEXT_PUBLIC_CLERK_SIGN_UP_URL="/register"
NEXT_PUBLIC_CLERK_SIGN_IN_FORCE_REDIRECT_URL="/study"
NEXT_PUBLIC_CLERK_SIGN_UP_FORCE_REDIRECT_URL="/study"
189 changes: 188 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"db:seed": "tsx ./src/db/scripts/seed.ts"
},
"dependencies": {
"@clerk/nextjs": "^6.31.10",
"@date-fns/utc": "^2.1.1",
"@hookform/resolvers": "^5.2.1",
"@neondatabase/serverless": "^1.0.1",
Expand Down
11 changes: 4 additions & 7 deletions src/app/(app)/study/page.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import { redirect } from "next/navigation";
import { Suspense } from "react";

import Header from "@/components/custom/header";
import Loading from "@/components/custom/loading";
import ProblemsDataTable from "@/components/custom/problems-data-table";
import { getStudyProblemCollections } from "@/db/queries";
import { auth } from "@/lib/auth";
import { getStudyProblemCollections } from "@/db/prepared";
import { auth } from "@clerk/nextjs/server";

export default async function Page() {
const { user } = await auth();
if (!user) redirect("/");

const promise = getStudyProblemCollections.execute({ userId: user.id });
const { userId } = await auth();
const promise = getStudyProblemCollections.execute({ userId });

return (
<div className="mx-auto max-w-2xl space-y-4 p-4">
Expand Down
9 changes: 9 additions & 0 deletions src/app/(auth)/login/[[...login]]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { SignIn } from "@clerk/nextjs";

export default function Page() {
return (
<main className="mx-auto flex h-dvh max-w-fit items-center">
<SignIn />
</main>
);
}
66 changes: 0 additions & 66 deletions src/app/(auth)/login/login-form.tsx

This file was deleted.

Loading