Skip to content

Commit d4b525b

Browse files
authored
DEVT-63: Add archive and misc (#62)
1 parent afbbf41 commit d4b525b

File tree

19 files changed

+675
-224
lines changed

19 files changed

+675
-224
lines changed

app/classrooms/_components/join-dialog.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ export default function JoinDialog({
5050
>
5151
{dialogTrigger ?? (
5252
<DialogTrigger asChild className="">
53-
<Button variant="default" className="flex gap-2">
53+
<Button
54+
variant="default"
55+
effect="hoverUnderlineInvert"
56+
className="flex gap-2"
57+
>
5458
<UserPlus /> Join
5559
</Button>
5660
</DialogTrigger>
@@ -64,7 +68,7 @@ export default function JoinDialog({
6468
<InputOTP
6569
maxLength={8}
6670
pattern={REGEXP_ONLY_DIGITS_AND_CHARS}
67-
value={joinValue}
71+
value={joinValue.toUpperCase()}
6872
onChange={(value) => setJoinValue(value)}
6973
>
7074
<InputOTPGroup>

app/classrooms/clientUtils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const optimisticUpdateAndFetchClassroomData = async <
5858
export function TooltipUtil({
5959
content,
6060
trigger,
61-
delayDuration = 300,
61+
delayDuration = 0,
6262
useSheetTrigger = false,
6363
}: {
6464
content: ReactNode;

app/classrooms/join/[code]/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export async function GET(
6565
//redirect to classroom
6666

6767
const successParams = new URLSearchParams({
68-
join_success: classroom.id.toString(),
68+
joinSuccess: classroom.id.toString(),
6969
});
7070
return redirect(`/classrooms?${successParams.toString()}`);
7171
}

app/classrooms/page.tsx

Lines changed: 145 additions & 161 deletions
Large diffs are not rendered by default.

app/favicon.ico

-15.7 KB
Binary file not shown.

app/layout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { getUserAndClassroomData } from "@shared/lib/userContext/contextFetcher"
1414
import { cn } from "@shared/lib/utils";
1515
import { Separator } from "@shared/components/ui/separator";
1616
import { Toaster } from "@/shared/components/ui/sonner";
17+
import { BackButton } from "@/shared/components/ui/sidebar/back-button";
1718

1819
const geistSans = Geist({
1920
variable: "--font-geist-sans",
@@ -75,12 +76,13 @@ export default async function RootLayout({
7576
>
7677
<main>
7778
<header className="flex h-16 shrink-0 items-center gap-2">
78-
<div className="flex items-center gap-2 px-4">
79+
<div className="flex items-center gap-1 px-4">
7980
<SidebarTrigger className="-ml-1" />
8081
<Separator
8182
orientation="vertical"
8283
className="mr-2 h-4"
8384
/>
85+
<BackButton />
8486
</div>
8587
</header>
8688
<div className="flex flex-1 flex-col gap-4 p-4 pt-0">

app/login/page.tsx

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,33 @@ import GoogleSignInButton from "@/shared/components/GoogleSignInButton";
33

44
export default async function LoginPage() {
55
return (
6-
<div className="flex min-h-screen items-center justify-center bg-gray-50">
7-
<div className="w-full max-w-md rounded-lg bg-white p-8 shadow-md">
8-
<form action={signInWithGoogle}>
9-
<GoogleSignInButton />
10-
</form>
6+
<div className="flex min-h-screen w-full items-center justify-center bg-[linear-gradient(0deg,_#FFF4D9,_#FFEFD2_52%,_#67C5FF)] text-center dark:bg-[linear-gradient(0deg,_#443461,_#130F5A_38%,_#1F1F1F)]">
7+
<div className="flex h-[50vh] w-[70vw] flex-col items-center justify-around rounded-xl bg-foreground/20">
8+
<div className="flex flex-col gap-2">
9+
<h1 className="text-8xl font-bold tracking-tight">Learn and grow</h1>
10+
<h2 className="text-4xl font-medium tracking-tight">
11+
with your personalized classroom agent
12+
</h2>
13+
</div>
14+
<div className="flex w-2/5 flex-col items-center gap-10">
15+
<h3 className="text-xl italic">
16+
A collaborative space for students and teachers to interact with the
17+
future of LLM-enhanced education.
18+
</h3>
19+
{/* <Button
20+
effect="hoverUnderlineWhiteExpand"
21+
icon={ArrowRightCircle}
22+
iconPlacement="right"
23+
className="h-12 w-full max-w-[20vw] bg-[#200092] text-white shadow-[0px_0px_45px_1px_#6083FF] hover:bg-[#200092]/90"
24+
>
25+
<Link href="classrooms" className="text-lg">
26+
Start your journey today
27+
</Link>
28+
</Button> */}
29+
<form action={signInWithGoogle}>
30+
<GoogleSignInButton className="shadow-[0px_0px_45px_1px_#6083FF]" />
31+
</form>
32+
</div>
1133
</div>
1234
</div>
1335
);

app/page.tsx

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,39 @@
1-
import { logout } from "@/app/login/actions";
2-
import Image from "next/image";
1+
import { Button } from "@/shared/components/ui/button";
2+
import { ArrowRightCircle } from "lucide-react";
3+
import Link from "next/link";
34

45
export default function Home() {
56
return (
6-
<div className="grid min-h-screen grid-rows-[20px_1fr_20px] items-center justify-items-center gap-16 p-8 pb-20 font-[family-name:var(--font-geist-sans)] sm:p-20">
7-
<main className="row-start-2 flex flex-col items-center gap-8 sm:items-start">
8-
<Image
7+
<div className="flex min-h-screen w-full items-center justify-center bg-[linear-gradient(0deg,_#FFF4D9,_#FFEFD2_52%,_#67C5FF)] text-center dark:bg-[linear-gradient(0deg,_#443461,_#130F5A_38%,_#1F1F1F)]">
8+
<div className="flex h-[50vh] w-[70vw] flex-col items-center justify-around rounded-xl bg-foreground/20">
9+
<div className="flex flex-col gap-2">
10+
<h1 className="text-8xl font-bold tracking-tight">Learn and grow</h1>
11+
<h2 className="text-4xl font-medium tracking-tight">
12+
with your personalized classroom agent
13+
</h2>
14+
</div>
15+
<div className="flex w-2/5 flex-col items-center gap-10">
16+
<h3 className="text-xl italic">
17+
A collaborative space for students and teachers to interact with the
18+
future of LLM-enhanced education.
19+
</h3>
20+
<Button
21+
effect="hoverUnderlineWhiteExpand"
22+
icon={ArrowRightCircle}
23+
iconPlacement="right"
24+
className="h-12 w-full max-w-[20vw] bg-[#200092] text-white shadow-[0px_0px_45px_1px_#6083FF] hover:bg-[#200092]/90"
25+
>
26+
<Link href="classrooms" className="text-lg">
27+
Start your journey today
28+
</Link>
29+
</Button>
30+
</div>
31+
</div>
32+
</div>
33+
);
34+
35+
{
36+
/* <Image
937
className="dark:invert"
1038
src="/next.svg"
1139
alt="Next.js logo"
@@ -51,9 +79,11 @@ export default function Home() {
5179
Logout
5280
</button>
5381
</form>
54-
</div>
55-
</main>
56-
<footer className="row-start-3 flex flex-wrap items-center justify-center gap-6">
82+
</div> */
83+
}
84+
85+
{
86+
/* <footer className="row-start-3 flex flex-wrap items-center justify-center gap-6">
5787
<a
5888
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
5989
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
@@ -99,7 +129,6 @@ export default function Home() {
99129
/>
100130
Go to nextjs.org →
101131
</a>
102-
</footer>
103-
</div>
104-
);
132+
</footer> */
133+
}
105134
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"format:check": "prettier --check ."
1919
},
2020
"dependencies": {
21+
"@radix-ui/react-accordion": "^1.2.4",
2122
"@radix-ui/react-alert-dialog": "^1.1.6",
2223
"@radix-ui/react-avatar": "^1.1.3",
2324
"@radix-ui/react-collapsible": "^1.1.3",

0 commit comments

Comments
 (0)