Last active
November 25, 2017 15:49
-
-
Save hoony-o-1/8413ef0576fd02f01e7f7c3b795a8b11 to your computer and use it in GitHub Desktop.
Revisions
-
Hoony revised this gist
Nov 25, 2017 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,10 @@ const ProtectedComponent = ({ Component, path }) => { switch (this.state.token) { case '': return <DefaultLayout path={path} Component={LoadingContainer} /> case 'UNAUTHORIZED': return <Redirect to="/login" /> default: return <DefaultLayout path={path} component={Component} /> } } -
Hoony renamed this gist
Sep 3, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Hoony revised this gist
Sep 3, 2017 . 1 changed file with 10 additions and 11 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,10 @@ const ProtectedComponent = ({ Layout, Component, path, ...rest }) => { switch (this.state.token) { case '': return <LoadingContainer /> case 'FAILED': return <Redirect to="/login" /> default: return <DefaultLayout {...rest} path={path} component={Component} /> } } -
Hoony created this gist
Sep 3, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ const ProtectedComponent = ({ Layout, Component, path, ...rest }) => { switch (this.state.token) { case '': return <LoadingContainer /> case 'FAILED': return <Redirect to="/login" /> default: return <DefaultLayout {...rest} path={path} component={Component} /> } }