Fixed all firebase login issues. Added private routes. Reconfigured components and reorganized project.

This commit is contained in:
Patrick Fic
2019-12-06 16:51:43 -08:00
parent 1176b62d0b
commit 0de42d3fee
19 changed files with 232 additions and 146 deletions

View File

@@ -0,0 +1,14 @@
import React from "react";
import { Route, Redirect } from "react-router-dom";
export default ({ component: Component, isAuthorized, ...rest }) => (
<Route
{...rest}
render={props =>
isAuthorized === true ? (
<Component {...props} />
) : (
<Redirect to="/signin" />
)
}
/>
);