{"size": 498, "ext": "js", "max_stars_repo_path": "src/components/notes/Favorites.js", "max_stars_repo_name": "notFromAnonymous/Note_Taking_App", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/notes/Favorites.js", "max_issues_repo_name": "notFromAnonymous/Note_Taking_App", "max_issues_repo_issues_event_min_datetime": "2021-05-25T15:27:11.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-25T19:12:11.000Z", "max_forks_repo_path": "src/components/notes/Favorites.js", "max_forks_repo_name": "notFromAnonymous/Note_Taking_App", "max_forks_repo_forks_event_min_datetime": "2021-05-25T13:56:36.000Z", "max_forks_repo_forks_event_max_datetime": "2021-05-25T13:56:36.000Z"}
{"max_stars_count": null, "max_issues_count": 3, "max_forks_count": 1, "avg_line_length": 38.3076923077, "max_line_length": 136, "alphanum_fraction": 0.7068273092}
import React from 'react'
import { useSelector } from 'react-redux'
import { useFirestoreConnect } from 'react-redux-firebase'
import NotesList from './NotesList'
const Favorites = () => {
    useFirestoreConnect([{ collection: 'notes', where: ['favorite', '==', true], orderBy: ['createdAt', 'desc'], storeAs: 'favnotes' }])
    const favnotes = useSelector(state => state.firestore.ordered.favnotes)
    console.log(favnotes)
    return <NotesList notes={favnotes} />
}

export default Favorites
