Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amparo
Amparo-frontend
Commits
02a3221b
Commit
02a3221b
authored
1 year ago
by
Martin Ferreira
Browse files
Options
Download
Email Patches
Plain Diff
removing Logs
parent
1cfbee05
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/AppRoutes.tsx
+0
-1
src/AppRoutes.tsx
src/utils/authService.tsx
+0
-1
src/utils/authService.tsx
with
0 additions
and
2 deletions
+0
-2
src/AppRoutes.tsx
View file @
02a3221b
...
...
@@ -24,7 +24,6 @@ export default function AppRoutes() {
function
PrivateRoute
({
children
}:
{
children
:
React
.
ReactNode
})
{
isLoggedIn
().
then
((
isAuthenticated
)
=>
{
console
.
log
(
isAuthenticated
);
if
(
!
isAuthenticated
)
{
return
window
.
location
.
href
=
ROUTES
.
LOGIN
();
}
...
...
This diff is collapsed.
Click to expand it.
src/utils/authService.tsx
View file @
02a3221b
...
...
@@ -4,7 +4,6 @@ import { isLogged } from "./apiService";
export
const
isLoggedIn
=
async
()
=>
{
const
token
=
localStorage
.
getItem
(
'
authToken
'
);
console
.
log
(
token
);
if
(
token
)
{
try
{
const
result
=
await
isLogged
();
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment