aboutsummaryrefslogtreecommitdiff
path: root/src/core/custom.router.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/custom.router.js')
-rw-r--r--src/core/custom.router.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/custom.router.js b/src/core/custom.router.js
index b3f08ec..c6b2859 100644
--- a/src/core/custom.router.js
+++ b/src/core/custom.router.js
@@ -7,7 +7,7 @@ export const CustomRouter = ({ xComponent: Component, ...xProps }) => {
<Route
{...xProps}
render={props => {
- console.log(props.permissions)
+ let returnProps = {...xProps, ...props};
let token = Storage.get("token");
let pathName = props.match.path;
if (!token && pathName !== "/login") {
@@ -19,8 +19,7 @@ export const CustomRouter = ({ xComponent: Component, ...xProps }) => {
return <Redirect to="/dashboard" />;
}
- debugger
- return <Component {...props} />;
+ return <Component {...returnProps} />;
}}
/>
);