forked from MildTomato/supabase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
42 lines (37 loc) · 1.22 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { useContext, useEffect } from "react";
import { AppContext } from "lib/constants";
import Link from "next/link";
import styles from "styles/Home.module.css";
import PageLayout from "components/PageLayout";
export default function Page() {
const { session } = useContext(AppContext);
useEffect(() => {
console.log("session: ", session);
}, []);
return (
<PageLayout title="Live Tracker">
<h1 className={styles.title}>Live Tracker</h1>
<p className={styles.description}>
Get started by choosing your role as Driver or Manager.
</p>
<p className={styles.sub_description}>
You can only login 1 role at a time. Please use incognito mode to test
multi users.
</p>
<div className={styles.grid}>
<Link href="/driver">
<a className={styles.card}>
<h3>Driver View →</h3>
<p>Find in-depth information about Next.js features and API.</p>
</a>
</Link>
<Link href="/manager">
<a className={styles.card}>
<h3>Manager View →</h3>
<p>Find in-depth information about Next.js features and API.</p>
</a>
</Link>
</div>
</PageLayout>
);
}