text: import React from 'react';
  import { Route, Redirect } from 'react-router-dom'
  import { firebaseStore } from './firebase.js';
  
  const PrivateRoute = ({ component: Component, ...rest }) => {
      return (
          <Route {...rest} render={props => (
              firebaseStore.store.signedIn ? (
                  <Component {...props} />
              ) : (
                  <Redirect to={{
                      pathname: '/login',
                      state: { from: props.location }
                  }} />
              )
          )} />
      )
  }
  
  export default PrivateRoute;