Merge pull request #74 from daily-demos/react-hooks
initiating the hooks with DailyProvider
This commit is contained in:
commit
ce280e2084
|
|
@ -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>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue