Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dashboard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
red-giant
dashboard
Commits
e8f5de30
Verified
Commit
e8f5de30
authored
3 years ago
by
Defendi Alberto
Browse files
Options
Downloads
Patches
Plain Diff
Re-add test tag.
parent
53d79418
No related branches found
Branches containing commit
No related tags found
2 merge requests
!56
Refined auth flow and new website pages.
,
!44
New route type (RestrictedRoute) and better api calls.
Pipeline
#12196
passed
3 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/App.tsx
+32
-27
32 additions, 27 deletions
src/App.tsx
with
32 additions
and
27 deletions
src/App.tsx
+
32
−
27
View file @
e8f5de30
...
@@ -34,33 +34,38 @@ export const App: FC = () => {
...
@@ -34,33 +34,38 @@ export const App: FC = () => {
},
[
isAuth
,
role
]);
},
[
isAuth
,
role
]);
return
(
return
(
<
ThemeProvider
theme
=
{
muiTheme
}
>
<
div
data-testid
=
"App"
>
<
AuthContext
.
Provider
value
=
{
value
}
>
<
ThemeProvider
theme
=
{
muiTheme
}
>
<
Router
>
<
AuthContext
.
Provider
value
=
{
value
}
>
<
Switch
>
<
Router
>
<
Route
exact
path
=
{
NonAuthRoutes
.
home
}
component
=
{
LandingPage
}
/>
<
Switch
>
<
Route
exact
path
=
{
NonAuthRoutes
.
home
}
component
=
{
LandingPage
}
/>
<
Route
path
=
{
NonAuthRoutes
.
auth
}
component
=
{
AuthUser
}
/>
<
Route
path
=
{
NonAuthRoutes
.
auth
}
component
=
{
AuthUser
}
/>
<
PrivateRoute
<
PrivateRoute
Component
=
{
Dashboard
}
Component
=
{
Dashboard
}
path
=
{
AuthRoutes
.
dashboard
}
path
=
{
AuthRoutes
.
dashboard
}
requiredRoles
=
{
[
Roles
.
admin
,
Roles
.
operator
,
Roles
.
senior
]
}
requiredRoles
=
{
[
Roles
.
admin
,
Roles
.
operator
,
Roles
.
senior
]
}
/>
/>
<
PrivateRoute
<
PrivateRoute
Component
=
{
HomePage
}
Component
=
{
HomePage
}
path
=
{
AuthRoutes
.
dashboard
}
path
=
{
AuthRoutes
.
dashboard
}
requiredRoles
=
{
[
Roles
.
admin
,
Roles
.
operator
,
Roles
.
senior
]
}
requiredRoles
=
{
[
Roles
.
admin
,
Roles
.
operator
,
Roles
.
senior
]
}
/>
/>
<
PrivateRoute
<
PrivateRoute
Component
=
{
ProfilePage
}
Component
=
{
ProfilePage
}
path
=
{
AuthRoutes
.
profile
}
path
=
{
AuthRoutes
.
profile
}
requiredRoles
=
{
[
Roles
.
admin
,
Roles
.
operator
,
Roles
.
senior
]
}
requiredRoles
=
{
[
Roles
.
admin
,
Roles
.
operator
,
Roles
.
senior
]
}
/>
/>
<
Route
path
=
{
NonAuthRoutes
.
unauthorized
}
component
=
{
Unauthorized
}
/>
<
Route
<
Route
component
=
{
NotFound
}
/>
path
=
{
NonAuthRoutes
.
unauthorized
}
</
Switch
>
component
=
{
Unauthorized
}
</
Router
>
/>
</
AuthContext
.
Provider
>
<
Route
component
=
{
NotFound
}
/>
</
ThemeProvider
>
</
Switch
>
</
Router
>
</
AuthContext
.
Provider
>
</
ThemeProvider
>
</
div
>
);
);
};
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment