stuff
Co-authored-by: Surya-Vemulapalli <Surya-Vemulapalli@users.noreply.github.com>
This commit is contained in:
1596
React/package-lock.json
generated
Normal file
1596
React/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
14
React/src/app/call.tsx
Normal file
14
React/src/app/call.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
'use client';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
const CallPage = () => {
|
||||
return (
|
||||
<div>
|
||||
<h1>Call Page</h1>
|
||||
<p>This is a basic React page.</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default CallPage;
|
||||
@@ -1,6 +1,11 @@
|
||||
"use client";
|
||||
import { useState } from "react";
|
||||
import { auth0 } from "../lib/auth0";
|
||||
|
||||
export default async function Home() {
|
||||
const [contacts, setContacts] = useState<string[]>([]);
|
||||
const [codeword, setCodeword] = useState("");
|
||||
|
||||
const session = await auth0.getSession();
|
||||
|
||||
console.log("Session:", session?.user);
|
||||
@@ -9,8 +14,8 @@ export default async function Home() {
|
||||
if (!session) {
|
||||
|
||||
return (
|
||||
<div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
|
||||
<main className="flex flex-col gap-[32px] row-start-2 items-center sm:items-start">
|
||||
<div className=" items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
|
||||
<main className="flex flex-row gap-[32px] row-start-2 items-center sm:items-start">
|
||||
<a href="/auth/login?screen_hint=signup">
|
||||
<button>Sign up</button>
|
||||
</a>
|
||||
@@ -18,6 +23,33 @@ export default async function Home() {
|
||||
<button>Log in</button>
|
||||
</a>
|
||||
</main>
|
||||
<h1>fauxcall</h1>
|
||||
<h2>set emergency contacts</h2>
|
||||
<p>if you stop speaking or say the codeword, these contacts will be notified</p>
|
||||
{/* form for setting codeword */}
|
||||
<form className="flex flex-col gap-[32px] row-start-2 items-center sm:items-start" onSubmit={(e) => e.preventDefault()}>
|
||||
<input
|
||||
type="text"
|
||||
value={codeword}
|
||||
onChange={(e) => setCodeword(e.target.value)}
|
||||
placeholder="codeword"
|
||||
className="border border-gray-300 rounded-md p-2"
|
||||
/>
|
||||
<button
|
||||
className="bg-blue-500 text-white rounded-md p-2"
|
||||
type="submit">Set codeword</button>
|
||||
</form>
|
||||
{/* form for adding contacts */}
|
||||
<form className="flex flex-col gap-[32px] row-start-2 items-center sm:items-start" onSubmit={(e) => e.preventDefault()}>
|
||||
<input
|
||||
type="text"
|
||||
value={contacts}
|
||||
onChange={(e) => setContacts(e.target.value.split(","))}
|
||||
placeholder="contacts (comma separated)"
|
||||
className="border border-gray-300 rounded-md p-2"
|
||||
/>
|
||||
<button type="submit">Set contacts</button>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user