Files
reflector/www/app/page.js
2023-07-26 16:43:12 +07:00

34 lines
1.0 KiB
JavaScript

"use client";
import React, { useState } from "react";
import Recorder from "./components/record.js";
import { Dashboard } from "./components/dashboard.js";
import useWebRTC from "./components/webrtc.js";
import "../public/button.css";
const App = () => {
const [stream, setStream] = useState(null);
// This is where you'd send the stream and receive the data from the server.
// transcription, summary, etc
const serverData = useWebRTC(stream, () => { });
return (
<div className="flex flex-col items-center h-[100svh]">
<div className="text-center py-6 mt-10">
<h1 className="text-5xl font-bold text-blue-500">Reflector</h1>
<p className="text-gray-500">Capture The Signal, Not The Noise</p>
</div>
<Recorder setStream={setStream} serverData={serverData} />
<Dashboard
transcriptionText={serverData.text ?? "(No transcription yet)"}
finalSummary={serverData.finalSummary}
topics={serverData.topics ?? []}
stream={stream}
/>
</div>
);
};
export default App;