File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 11import React , { Component } from 'react'
22import hoistStatics from 'hoist-non-react-statics'
33import { wrapDisplayName } from './utils'
4+ import ReactReduxFirebaseContext from './ReactReduxFirebaseContext'
45import ReduxFirestoreContext from './ReduxFirestoreContext'
56
67/**
@@ -35,9 +36,20 @@ export const createWithFirestore = (storeKey = 'store') => WrappedComponent => {
3536 const HoistedComp = hoistStatics ( WithFirestore , WrappedComponent )
3637
3738 const withFirestore = props => (
38- < ReduxFirestoreContext . Consumer >
39- { firestore => < HoistedComp firestore = { firestore } { ...props } /> }
40- </ ReduxFirestoreContext . Consumer >
39+ < ReactReduxFirebaseContext . Consumer >
40+ { firebase => (
41+ < ReduxFirestoreContext . Consumer >
42+ { firestore => (
43+ < HoistedComp
44+ firestore = { firestore }
45+ firebase = { firebase }
46+ dispatch = { firebase . dispatch }
47+ { ...props }
48+ />
49+ ) }
50+ </ ReduxFirestoreContext . Consumer >
51+ ) }
52+ </ ReactReduxFirebaseContext . Consumer >
4153 )
4254
4355 withFirestore . displayName = wrapDisplayName ( WrappedComponent , 'withFirestore' )
You can’t perform that action at this time.
0 commit comments