-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Route for project/${project.id} is dead #82
Comments
I'm not sure why this is using firebaseConnect when the project is made using firestore |
to be clear, i ran |
@hcwiley You are correct, when selecting Firestore, it should use |
I've changed the ProjectPage.enhancer.js to look like this and it is working: import { compose } from 'redux'
import { connect } from 'react-redux'
import { firestoreConnect, getVal } from 'react-redux-firebase'
import { spinnerWhileLoading } from 'utils/components'
import { UserIsAuthenticated } from 'utils/router'
export default compose(
// redirect to /login if user is not logged in
UserIsAuthenticated,
// Map auth uid from state to props
connect(({ firebase: { auth: { uid } } }) => ({ uid })),
// Wait for uid to exist before going further
spinnerWhileLoading(['uid']),
// Create listeners based on current users UID
firestoreConnect(({ params, uid }) => [
// Listener for projects the current user created
{
collection: 'projects',
where: ['createdBy', '==', uid]
}
]),
spinnerWhileLoading(['firestore']),
// // Map projects from state to props
connect(({ firestore: { data } }, {params}) => ({
project: getVal(data, `projects/${params.projectname}`)
})),
// Show loading spinner while project is loading
spinnerWhileLoading(['project'])
) |
* fix(generator): fix project page enhancer - #82 * fix(generator): removed lint from Firestore and Non Firestore templates * fix(generator): removed unused config objects from `project.config`
@hcwiley The changes that you mentioned have been added, and published in Let me know if it doesn't work as intended for you, thanks for reporting! |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Project page has no data from firebase store project.
What is the expected behavior?
It should display the project name and then the json below that
Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?
I would image all browsers. I don't know about previous versions.
The text was updated successfully, but these errors were encountered: