- Once changes are done, add them to stash buy running below 👇 command:
git stash
- Once stash is done, create a patch file for the diff
git stash show -p stash@{0} > {file_name}
| import React from "react"; | |
| import { Route, Redirect } from "react-router-dom"; | |
| import { connect } from "react-redux"; | |
| import PropType from "prop-types"; | |
| const ProtectedRoutes = ({ isLoggedIn, children, ...rest }) => { | |
| return isLoggedIn ? ( | |
| <Route {...rest} render={(props) => children} /> | |
| ) : ( | |
| <Redirect to="/login" /> |