File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,21 @@ import { DailyRoom } from './DailyRoom';
2020import { DailyTranscriptions } from './DailyTranscriptions' ;
2121import { useCallObject } from './hooks/useCallObject' ;
2222
23- type Props =
23+ type BaseProps =
2424 | DailyFactoryOptions
2525 | {
2626 callObject : DailyCall | null ;
2727 } ;
2828
29+ type Props = BaseProps & {
30+ jotaiStore ?: React . ComponentProps < typeof Provider > [ 'store' ] ;
31+ } ;
32+
2933type EventsMap = Partial < Record < DailyEvent , Map < number , Function > > > ;
3034
3135export const DailyProvider : React . FC < React . PropsWithChildren < Props > > = ( {
3236 children,
37+ jotaiStore,
3338 ...props
3439} ) => {
3540 const eventsMap = useRef < EventsMap > ( { } ) ;
@@ -126,7 +131,7 @@ export const DailyProvider: React.FC<React.PropsWithChildren<Props>> = ({
126131 ) ;
127132
128133 return (
129- < Provider >
134+ < Provider store = { jotaiStore } >
130135 < DailyContext . Provider value = { callObject } >
131136 < DailyEventContext . Provider value = { { on, off } } >
132137 < DailyRoom >
You can’t perform that action at this time.
0 commit comments