Merge pull request #74 from daily-demos/react-hooks

initiating the hooks with DailyProvider
This commit is contained in:
Harshith Pabbati 2022-04-06 10:01:27 +05:30 committed by GitHub
commit ce280e2084
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -13,6 +13,7 @@ import React, {
useState, useState,
} from 'react'; } from 'react';
import DailyIframe from '@daily-co/daily-js'; import DailyIframe from '@daily-co/daily-js';
import { DailyProvider } from '@daily-co/daily-react-hooks';
import Bowser from 'bowser'; import Bowser from 'bowser';
import { useRouter } from 'next/router'; import { useRouter } from 'next/router';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
@ -159,7 +160,7 @@ export const CallProvider = ({
setEnableJoinSound setEnableJoinSound
}} }}
> >
{children} <DailyProvider callObject={daily}>{children}</DailyProvider>
</CallContext.Provider> </CallContext.Provider>
); );
}; };

View File

@ -4,7 +4,8 @@
"private": true, "private": true,
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@daily-co/daily-js": "0.21.0", "@daily-co/daily-js": "^0.24.0",
"@daily-co/daily-react-hooks": "^0.1.0",
"bowser": "^2.11.0", "bowser": "^2.11.0",
"classnames": "^2.3.1", "classnames": "^2.3.1",
"debounce": "^1.2.1", "debounce": "^1.2.1",
@ -15,6 +16,7 @@
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-portal": "^4.2.1", "react-portal": "^4.2.1",
"recoil": "^0.7.0",
"shallow-equal": "^1.2.1", "shallow-equal": "^1.2.1",
"use-deep-compare": "^1.1.0" "use-deep-compare": "^1.1.0"
} }