File size: 604 Bytes
a3e20c4
 
687da3c
76b9248
 
 
687da3c
289f294
94f1dbe
687da3c
 
 
 
 
 
 
 
 
 
76b9248
 
 
 
 
687da3c
 
94f1dbe
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
"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}>
      <div className="container flex align-center min-h-screen">
        <div className="self-center w-full">
          <Call />
        </div>
      </div>
    </DailyProvider>
  );
}