Jon Taylor commited on
Commit
cad9679
·
1 Parent(s): 6ede83d
frontend/app/components/App.js CHANGED
@@ -1,8 +1,9 @@
1
  "use client";
2
 
3
  import { useEffect, useState } from "react";
4
- import Call from "./components/Call";
5
- import App from "next/app";
 
6
 
7
  export default function Home() {
8
  const [daily, setDaily] = useState();
@@ -13,5 +14,9 @@ export default function Home() {
13
  setDaily(Daily.createCallObject());
14
  }, [daily]);
15
 
16
- return <App />;
 
 
 
 
17
  }
 
1
  "use client";
2
 
3
  import { useEffect, useState } from "react";
4
+ import { DailyProvider } from "@daily-co/daily-react";
5
+ import Daily from "@daily-co/daily-js";
6
+ import Call from "./Call";
7
 
8
  export default function Home() {
9
  const [daily, setDaily] = useState();
 
14
  setDaily(Daily.createCallObject());
15
  }, [daily]);
16
 
17
+ return (
18
+ <DailyProvider callObject={daily}>
19
+ <Call />
20
+ </DailyProvider>
21
+ );
22
  }
frontend/app/page.js CHANGED
@@ -1,22 +1,6 @@
1
  "use client";
2
 
3
- import { useEffect, useState } from "react";
4
- import { DailyProvider } from "@daily-co/daily-react";
5
- import Daily from "@daily-co/daily-js";
6
- import Call from "./components/Call";
7
-
8
  export default function Home() {
9
- const [daily, setDaily] = useState();
10
-
11
- useEffect(() => {
12
- if (daily) return;
13
-
14
- setDaily(Daily.createCallObject());
15
- }, [daily]);
16
-
17
- return (
18
- <DailyProvider callObject={daily}>
19
- <Call />
20
- </DailyProvider>
21
- );
22
  }
 
1
  "use client";
2
 
3
+ import App from "./components/App";
 
 
 
 
4
  export default function Home() {
5
+ return <App />;
 
 
 
 
 
 
 
 
 
 
 
 
6
  }