AdminPrivateRoute.js 485 Bytes
Newer Older
Yoon, Daeki's avatar
Yoon, Daeki committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// import React from 'react';
// import { Redirect, Route } from "react-router-dom";

// export const AdminPrivateRoute = ({ component: Component, ...rest }) => (
//   <Route
//     {...rest}
//     render={props =>
//       (localStorage.getItem("token") !==null) ? (
//         <Component {...props} />
//       ) : (
//           <Redirect to={{ 
//             pathname: "/login",
//             state: {match: props.location}
//            }} />
//         )
//     }
//   />
// )