Skip to content

Commit e8c8939

Browse files
committed
basic
1 parent 33ed30d commit e8c8939

34 files changed

+1050
-1851
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,3 @@ yarn-error.log*
3434
# typescript
3535
*.tsbuildinfo
3636
next-env.d.ts
37-
.env

actions/saveBookmark.tsx

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
"use server";
2+
import { db } from "@/db";
3+
import { auth, currentUser } from "@clerk/nextjs/server";
4+
import { projects } from "@/db/schema";
5+
import { redirect } from "next/navigation";
6+
7+
export async function createProject(formData: FormData) {
8+
const { userId } = auth();
9+
10+
const project = {
11+
name: formData.get("name") as string,
12+
description: formData.get("description") as string,
13+
url: formData.get("url") as string,
14+
userId,
15+
};
16+
17+
const [newProject] = await db
18+
.insert(projects)
19+
.values(project)
20+
.returning({ insertedId: projects.id });
21+
22+
redirect(`/projects/${newProject.insertedId}/instructions`);
23+
}

app/(user)/dashboard/page.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default function Page(){
2+
return (
3+
<div>
4+
protactive Page
5+
</div>
6+
)
7+
}

app/(user)/layout.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default function UserLayout ({children} : {children: React.ReactNode}) {
2+
return (
3+
<div className="container w-full max-w-screen-xl mx-auto py-10 px-2.5 lg:px-20">
4+
{children}
5+
</div>
6+
);
7+
}

app/NavBar.tsx

-48
This file was deleted.

app/api/issues/route.ts

-16
This file was deleted.

app/components/ErrorMessage.tsx

-12
This file was deleted.

app/components/Spinner.tsx

-16
This file was deleted.

app/globals.css

+59-14
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,68 @@
22
@tailwind components;
33
@tailwind utilities;
44

5-
:root {
6-
--foreground-rgb: 0, 0, 0;
7-
}
8-
9-
/* @media (prefers-color-scheme: dark) {
5+
@layer base {
106
:root {
11-
--foreground-rgb: 255, 255, 255;
7+
--background: 0 0% 100%;
8+
--foreground: 222.2 84% 4.9%;
9+
--card: 0 0% 100%;
10+
--card-foreground: 222.2 84% 4.9%;
11+
--popover: 0 0% 100%;
12+
--popover-foreground: 222.2 84% 4.9%;
13+
--primary: 222.2 47.4% 11.2%;
14+
--primary-foreground: 210 40% 98%;
15+
--secondary: 210 40% 96.1%;
16+
--secondary-foreground: 222.2 47.4% 11.2%;
17+
--muted: 210 40% 96.1%;
18+
--muted-foreground: 215.4 16.3% 46.9%;
19+
--accent: 210 40% 96.1%;
20+
--accent-foreground: 222.2 47.4% 11.2%;
21+
--destructive: 0 84.2% 60.2%;
22+
--destructive-foreground: 210 40% 98%;
23+
--border: 214.3 31.8% 91.4%;
24+
--input: 214.3 31.8% 91.4%;
25+
--ring: 222.2 84% 4.9%;
26+
--radius: 0.5rem;
27+
--chart-1: 12 76% 61%;
28+
--chart-2: 173 58% 39%;
29+
--chart-3: 197 37% 24%;
30+
--chart-4: 43 74% 66%;
31+
--chart-5: 27 87% 67%;
1232
}
13-
} */
1433

15-
body {
16-
color: rgb(var(--foreground-rgb));
17-
/* padding: 1rem; */
34+
.dark {
35+
--background: 222.2 84% 4.9%;
36+
--foreground: 210 40% 98%;
37+
--card: 222.2 84% 4.9%;
38+
--card-foreground: 210 40% 98%;
39+
--popover: 222.2 84% 4.9%;
40+
--popover-foreground: 210 40% 98%;
41+
--primary: 210 40% 98%;
42+
--primary-foreground: 222.2 47.4% 11.2%;
43+
--secondary: 217.2 32.6% 17.5%;
44+
--secondary-foreground: 210 40% 98%;
45+
--muted: 217.2 32.6% 17.5%;
46+
--muted-foreground: 215 20.2% 65.1%;
47+
--accent: 217.2 32.6% 17.5%;
48+
--accent-foreground: 210 40% 98%;
49+
--destructive: 0 62.8% 30.6%;
50+
--destructive-foreground: 210 40% 98%;
51+
--border: 217.2 32.6% 17.5%;
52+
--input: 217.2 32.6% 17.5%;
53+
--ring: 212.7 26.8% 83.9%;
54+
--chart-1: 220 70% 50%;
55+
--chart-2: 160 60% 45%;
56+
--chart-3: 30 80% 55%;
57+
--chart-4: 280 65% 60%;
58+
--chart-5: 340 75% 55%;
59+
}
1860
}
1961

20-
@layer utilities {
21-
.text-balance {
22-
text-wrap: balance;
62+
@layer base {
63+
* {
64+
@apply border-border;
2365
}
24-
}
66+
body {
67+
@apply bg-background text-foreground;
68+
}
69+
}

app/issues/new/page.tsx

-76
This file was deleted.

app/issues/page.tsx

-17
This file was deleted.

app/layout.tsx

+14-22
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,22 @@
1-
import "@radix-ui/themes/styles.css";
2-
import { Theme, ThemePanel } from "@radix-ui/themes";
3-
import type { Metadata } from "next";
4-
import { Inter } from "next/font/google";
1+
import {
2+
ClerkProvider,
3+
} from "@clerk/nextjs";
54
import "./globals.css";
6-
import NavBar from "./NavBar";
7-
8-
const inter = Inter({ subsets: ["latin"], variable: "--font-inter" });
9-
10-
export const metadata: Metadata = {
11-
title: "Trace ↯",
12-
description: "Generated by create next app",
13-
};
5+
import PageHeader from "@/components/page-header";
146

157
export default function RootLayout({
168
children,
17-
}: Readonly<{
9+
}: {
1810
children: React.ReactNode;
19-
}>) {
11+
}) {
2012
return (
21-
<html lang="en" data-theme="wireframe">
22-
<body className={inter.variable}>
23-
<Theme scaling="110%">
24-
<NavBar />
25-
<main className="p-5">{children}</main>
26-
</Theme>
27-
</body>
28-
</html>
13+
<ClerkProvider>
14+
<html lang="en">
15+
<body>
16+
<PageHeader />
17+
{children}
18+
</body>
19+
</html>
20+
</ClerkProvider>
2921
);
3022
}

app/page.tsx

+21-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
1+
import { Input } from "@/components/ui/input";
12
import Image from "next/image";
23

34
export default function Home() {
45
return (
5-
<div>yoo</div>
6+
<div className="container w-full max-w-screen-xl mx-auto py-10 px-2.5 lg:px-20">
7+
<h1 className="font-medium text-3xl text-gray-900 mb-2">
8+
Find repository
9+
</h1>
10+
<p className="text-base italic max-w-prose text-muted-foreground mb-4">
11+
Required fields are marked with an asterisk (*).
12+
</p>
13+
14+
<div className="max-w-xl flex gap-4">
15+
<div>
16+
<p>Owner Name </p>
17+
<Input />
18+
</div>
19+
20+
<div>
21+
<p>Repository Name *</p>
22+
<Input />
23+
</div>
24+
</div>
25+
</div>
626
);
727
}

0 commit comments

Comments
 (0)