Created
September 14, 2022 12:10
-
-
Save hieptl/6ff91570a01cf3c773f0112bb4405ee4 to your computer and use it in GitHub Desktop.
Instagram Clone React Node - PrivateRoute.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Route, Redirect } from 'react-router-dom'; | |
const PrivateRoute = ({component: Component, ...rest}) => { | |
return ( | |
<Route {...rest} render={props => ( | |
localStorage.getItem('auth') ? | |
<Component {...props} /> | |
: <Redirect to="/login" /> | |
)} /> | |
); | |
}; | |
export default PrivateRoute; |
The Nulls Brawl 2025 game's core mechanics revolve around trophy progression, character upgrades, and team-based tactical gameplay, challenging players to master intricate map dynamics, perfect their character skills, and outmaneuver opponents in pulse-pounding multiplayer battles that demand quick thinking and precise execution
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Are you ready to embark on a thrilling journey through a world of shapes, obstacles, and pulsating beats? Welcome to our comprehensive guide on APK Geometry Dash, the mobile version of the wildly popular rhythm-based platformer that has taken the gaming world by storm. Whether you’re a seasoned player looking to download the latest Geometry Dash 2.2 update or a curious newcomer wondering how to get started with Geometry Dash free download, this article has got you covered.