+ Home Page
+ The Home Page is accessible by everyone.
);
-}
+};
+export default LandingPage;
diff --git a/client/src/routes/PrivateRoute.jsx b/client/src/routes/PrivateRoute.jsx
new file mode 100644
index 0000000..705dfd8
--- /dev/null
+++ b/client/src/routes/PrivateRoute.jsx
@@ -0,0 +1,27 @@
+import React, { useEffect } from "react";
+import { withRouter, Route } from "react-router-dom";
+import { useFirebase } from "../services/auth";
+import * as ROUTES from "../constants/routes";
+
+const PrivateRoute = ({
+ component: Component,
+ condition,
+ path,
+ history,
+ ...rest
+}) => {
+ const firebase = useFirebase();
+
+ useEffect(() => {
+ firebase.auth.onAuthStateChanged((authUser) => {
+ if (!condition(authUser)) {
+ history.push(ROUTES.SIGN_IN);
+ }
+ });
+ }, [firebase.auth, condition, history]);
+
+ const render = (props) =>