|
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"; |
7 | 2 |
|
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"; |
36 | 4 |
|
| 5 | +export default function HomePage() { |
37 | 6 | 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 */} |
92 | 10 | </div> |
93 | 11 | ); |
94 | 12 | } |
0 commit comments