Skip to content

Commit f3926e4

Browse files
committed
Added SQL course
1 parent 1e8cf8e commit f3926e4

3 files changed

Lines changed: 14 additions & 88 deletions

File tree

components/login.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ export default function Login() {
3838
alt={"Python bingbong"}
3939
bannerurl={"/python.jpg"}
4040
/>
41+
<Course
42+
homeid="9a393c4c-a7ba-42b2-a55e-0d630102eda4"
43+
description={"Learn the basics of SQL and learn how to use databases."}
44+
title={"Intro to SQL"}
45+
alt={"SQL Banner"}
46+
bannerurl={"/sql.jpg"}
47+
48+
/>
4149
</div>
4250
<div className="absolute">
4351
<button className="coursen-button" onClick={() => signOut()}>Logout of {session.user.name}</button>

pages/index.tsx

Lines changed: 6 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,12 @@
1-
import type { NextPage } from "next";
2-
import Head from "next/head";
3-
import Image from "next/image";
4-
import styles from "../styles/Home.module.css";
5-
import Course from "../components/new-course.jsx";
6-
import Link from "next/link";
1+
import Login from "../components/login";
72

8-
import { useSession } from "next-auth/react";
9-
10-
export default function Home() {
11-
const { status } = useSession({
12-
required: true,
13-
onUnauthenticated() {
14-
// The user is not authenticated, handle it here.
15-
},
16-
});
17-
18-
if (status === "loading") {
19-
return (
20-
<div className={styles.container}>
21-
<Head>
22-
<title>Tech Optimum Courses</title>
23-
<meta name="description" content="Courses by Tech Optimum" />
24-
<link rel="icon" href="/favicon.ico" />
25-
</Head>
26-
<div>
27-
<h1 className="headline">Courses Portal</h1>
28-
<p className="align-center">
29-
You must login with Discord to access Tech Optimum courses. Please
30-
click <Link href="/login">here</Link> to login.
31-
</p>
32-
</div>
33-
</div>
34-
);
35-
}
3+
import React from "react";
364

5+
export default function HomePage() {
376
return (
38-
<div className={styles.container}>
39-
<Head>
40-
<title>Tech Optimum Courses</title>
41-
<meta name="description" content="Courses by Tech Optimum" />
42-
<link rel="icon" href="/favicon.ico" />
43-
</Head>
44-
<main className={styles.main}>
45-
<Link href="https://techoptimum.org">
46-
<Image
47-
className="image-link"
48-
width={"400px"}
49-
height="150px"
50-
src="/text-lblue-transparent.png"
51-
alt="Tech Optimum Logo"
52-
/>
53-
</Link>
54-
<h1 className={styles.title}>Courses Portal</h1>
55-
<br />
56-
<br />
57-
58-
<div className={styles.grid}>
59-
{/* <Course
60-
homeid="5b245c12-e448-43ff-8183-373c37db2a62"
61-
description="Learn the Basics of HTML, CSS, and JavaScript."
62-
title={"Intro to Web Dev."}
63-
alt={"Web Developer Banner"}
64-
bannerurl={"/html.png"}
65-
></Course>*/}
66-
67-
<Course
68-
homeid="32778a40-8f63-4dbc-a6e8-a3f8b6d79e11"
69-
description="Learn the basics of Python and learn how to use datasets and variables."
70-
title={"Intro to Python"}
71-
alt={"Python bingbong"}
72-
bannerurl={"/python.jpg"}
73-
/>
74-
</div>
75-
<br />
76-
<p className="c-soon">More courses coming soon.</p>
77-
78-
<p className="report-bugs-home">
79-
Return to our <Link href="https://techoptimum.org">Main Website</Link>
80-
<br />
81-
<br />
82-
Report course errors to our{" "}
83-
<Link
84-
rel="noreferrer"
85-
target={"_blank"}
86-
href="https://discord.gg/HpRfm7kp3U"
87-
>
88-
Discord Server
89-
</Link>
90-
</p>
91-
</main>
7+
<div>
8+
<Login />
9+
{/* hello */}
9210
</div>
9311
);
9412
}

public/sql.jpg

12 KB
Loading

0 commit comments

Comments
 (0)