Merge branch 'main' of https://github.com/GamerBoss101/HooHacks-12
This commit is contained in:
@@ -1,14 +0,0 @@
|
|||||||
'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;
|
|
||||||
34
React/src/app/call/page.tsx
Normal file
34
React/src/app/call/page.tsx
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const CallPage = () => {
|
||||||
|
const [callDuration, setCallDuration] = React.useState(0);
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
const interval = setInterval(() => {
|
||||||
|
setCallDuration((prev) => prev + 1);
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
return () => clearInterval(interval);
|
||||||
|
}, []);
|
||||||
|
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">
|
||||||
|
<h1 className="text-4xl font-bold text-center sm:text-left">
|
||||||
|
Call with a Definitely Real Person</h1>
|
||||||
|
|
||||||
|
<div className="text-2xl font-bold">{callDuration}s</div>
|
||||||
|
<button className="bg-red-500 text-white rounded-md p-2">Emergency</button>
|
||||||
|
<button className="bg-blue-500 text-white rounded-md p-2"
|
||||||
|
onClick={() => {
|
||||||
|
window.location.href = '/';
|
||||||
|
}}>
|
||||||
|
End
|
||||||
|
</button>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default CallPage;
|
||||||
Reference in New Issue
Block a user