How to use the react-redux-firebase/lib/helpers.isEmpty function in react-redux-firebase

To help you get started, we’ve selected a few react-redux-firebase examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github prescottprue / fireadmin / src / containers / Navbar / Navbar.js View on Github external
function Navbar({ history, firebase, auth, profile }) {
  const classes = useStyles()
  const authExists = isLoaded(auth) && !isEmpty(auth)

  return (
    <AppBar position="static" className={classes.appBar}>
      <Toolbar>
        <Typography
          color="inherit"
          variant="h6"
          component={Link}
          to={authExists ? LIST_PATH : '/'}
          className={classes.brand}
          data-test="brand">
          Fireadmin
        </Typography>
        <Hidden xsDown>
          <Button
            component="a"
github prescottprue / generator-react-firebase / examples / redux-firestore / src / utils / components.js View on Github external
propNames.some(propNames, name => {
        const propValue = get(props, name)
        return (
          isLoaded(propValue) &&
          (isEmpty(propValue) ||
            (Array.isArray(propValue) && !Object.keys(propValue).length))
        )
      }),
    component
github prescottprue / fireadmin / src / utils / components.js View on Github external
some(propsNames, name => {
        const propValue = get(props, name)
        return (
          isLoaded(propValue) &&
          (isEmpty(propValue) || (isArray(propValue) && !size(propValue)))
        )
      }),
    component
github prescottprue / react-redux-firebase / examples / complete / material / src / routes / Projects / components / ProjectsPage / ProjectsPage.js View on Github external
render={() => (
          <div className={classes.root}>
            <NewProjectDialog
              onSubmit={addProject}
              open={newDialogOpen}
              onRequestClose={toggleDialog}
            />
            <div className={classes.tiles}>
              <NewProjectTile onClick={toggleDialog} />
              {!isEmpty(projects) &&
                projects.map((project, ind) => (
                  <ProjectTile
                    key={`Project-${project.key}-${ind}`}
                    name={project.value.name}
                    onSelect={() => goToProject(project.key)}
                    onDelete={() => deleteProject(project.key)}
                  />
                ))}
            </div>
          </div>
        )}
      />
github prescottprue / generator-react-firebase / generators / app / templates / src / utils / components.js View on Github external
some(propsNames, name => {
        const propValue = get(props, name)
        return (
          isLoaded(propValue) &&
          (isEmpty(propValue) || (isArray(propValue) && !size(propValue)))
        )
      }),
    component
github prescottprue / fireadmin / src / routes / Projects / components / ProjectsPage / ProjectsPage.js View on Github external
onSubmit={addProject}
        onRequestClose={toggleDialog}
      />
      <div className={classes.tiles}>
        <NewProjectTile onClick={toggleDialog} />
        {!isEmpty(projects) &&
          projects.map((project, ind) => (
            <ProjectTile
              key={`Project-${project.id}-${ind}`}
              project={project}
              onCollabClick={goToCollaborator}
              onSelect={() => goToProject(project.id)}
              onDelete={() => deleteProject(project.id)}
            />
          ))}
        {!isEmpty(collabProjects) &&
          collabProjects.map((project, ind) => (
            <ProjectTile
              key={`Collab-Project-${project.id}-${ind}`}
              project={project}
              onCollabClick={goToCollaborator}
              onSelect={() => goToProject(project.id)}
              onDelete={() => deleteProject(project.id)}
            />
          ))}
      </div>
    </div>
  )
github prescottprue / fireadmin / src / routes / Projects / components / ProjectsPage / ProjectsPage.js View on Github external
addProject,
  goToProject,
  goToCollaborator
}) =>
  children ? (
    cloneElement(children, { auth })
  ) : (
    <div className={classes.container}>
      <NewProjectDialog
        open={newDialogOpen}
        onSubmit={addProject}
        onRequestClose={toggleDialog}
      />
      <div className={classes.tiles}>
        <NewProjectTile onClick={toggleDialog} />
        {!isEmpty(projects) &&
          projects.map((project, ind) => (
            <ProjectTile
              key={`Project-${project.id}-${ind}`}
              project={project}
              onCollabClick={goToCollaborator}
              onSelect={() => goToProject(project.id)}
              onDelete={() => deleteProject(project.id)}
            />
          ))}
        {!isEmpty(collabProjects) &&
          collabProjects.map((project, ind) => (
            <ProjectTile
              key={`Collab-Project-${project.id}-${ind}`}
              project={project}
              onCollabClick={goToCollaborator}
              onSelect={() => goToProject(project.id)}