Jon Taylor
call state implemented
35f4179
raw
history blame contribute delete
463 Bytes
"use client";
import Daily from "@daily-co/daily-js";
import { DailyProvider } from "@daily-co/daily-react";
import { useEffect, useState } from "react";
import Call from "./components/Call";
export default function Home() {
const [daily, setDaily] = useState();
useEffect(() => {
if (daily) return;
setDaily(Daily.createCallObject());
}, [daily]);
return (
<DailyProvider callObject={daily}>
<Call />
</DailyProvider>
);
}