Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Ceph Webapp Poc
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Jacopo Gasparetto
Ceph Webapp Poc
Commits
44320bb8
Commit
44320bb8
authored
1 year ago
by
Jacopo Gasparetto
Browse files
Options
Downloads
Patches
Plain Diff
Renamed routes constant to staticRoutes
parent
7e9f3aeb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
frontend/src/App.tsx
+2
-2
2 additions, 2 deletions
frontend/src/App.tsx
frontend/src/components/Drawer.tsx
+2
-2
2 additions, 2 deletions
frontend/src/components/Drawer.tsx
frontend/src/routes/index.tsx
+2
-2
2 additions, 2 deletions
frontend/src/routes/index.tsx
with
6 additions
and
6 deletions
frontend/src/App.tsx
+
2
−
2
View file @
44320bb8
import
{
createBrowserRouter
,
RouterProvider
}
from
'
react-router-dom
'
;
import
{
createBrowserRouter
,
RouterProvider
}
from
'
react-router-dom
'
;
import
{
useState
,
useEffect
}
from
'
react
'
;
import
{
useState
,
useEffect
}
from
'
react
'
;
import
{
BucketInfo
}
from
'
./models/bucket
'
;
import
{
BucketInfo
}
from
'
./models/bucket
'
;
import
{
r
out
e
s
}
from
'
./routes
'
;
import
{
staticR
outs
}
from
'
./routes
'
;
import
APIService
from
'
./services/APIService
'
;
import
APIService
from
'
./services/APIService
'
;
import
{
BucketsListContext
}
from
'
./services/BucketListContext
'
;
import
{
BucketsListContext
}
from
'
./services/BucketListContext
'
;
...
@@ -22,7 +22,7 @@ function App() {
...
@@ -22,7 +22,7 @@ function App() {
},
[
isAuthenticated
]);
},
[
isAuthenticated
]);
const
router
=
createBrowserRouter
(
r
out
e
s
.
map
(
route
=>
{
const
router
=
createBrowserRouter
(
staticR
outs
.
map
(
route
=>
{
return
{
return
{
path
:
route
.
path
,
path
:
route
.
path
,
element
:
route
.
element
element
:
route
.
element
...
...
This diff is collapsed.
Click to expand it.
frontend/src/components/Drawer.tsx
+
2
−
2
View file @
44320bb8
import
{
r
out
e
s
}
from
'
../routes
'
;
import
{
staticR
outs
}
from
'
../routes
'
;
import
{
Link
}
from
'
react-router-dom
'
;
import
{
Link
}
from
'
react-router-dom
'
;
export
const
Drawer
=
()
=>
{
export
const
Drawer
=
()
=>
{
const
path
=
window
.
location
.
pathname
;
const
path
=
window
.
location
.
pathname
;
const
links
=
r
out
e
s
.
map
(
route
=>
{
const
links
=
staticR
outs
.
map
(
route
=>
{
let
className
=
"
h-10 hover:bg-neutral-300 rounded-lg p-2
"
;
let
className
=
"
h-10 hover:bg-neutral-300 rounded-lg p-2
"
;
className
+=
route
.
path
===
path
?
"
bg-neutral-200
"
:
""
;
className
+=
route
.
path
===
path
?
"
bg-neutral-200
"
:
""
;
return
(
return
(
...
...
This diff is collapsed.
Click to expand it.
frontend/src/routes/index.tsx
+
2
−
2
View file @
44320bb8
import
React
,
{
ReactNode
}
from
'
react
'
;
import
{
ReactNode
}
from
'
react
'
;
import
{
Home
}
from
'
./Home
'
;
import
{
Home
}
from
'
./Home
'
;
import
{
Buckets
}
from
'
./Buckets
'
;
import
{
Buckets
}
from
'
./Buckets
'
;
...
@@ -8,7 +8,7 @@ export type Route = {
...
@@ -8,7 +8,7 @@ export type Route = {
element
:
ReactNode
element
:
ReactNode
}
}
export
const
r
out
e
s
:
Route
[]
=
[
export
const
staticR
outs
:
Route
[]
=
[
{
title
:
"
Home
"
,
path
:
"
/
"
,
element
:
<
Home
/>
},
{
title
:
"
Home
"
,
path
:
"
/
"
,
element
:
<
Home
/>
},
{
title
:
"
Buckets
"
,
path
:
"
/buckets
"
,
element
:
<
Buckets
/>
}
{
title
:
"
Buckets
"
,
path
:
"
/buckets
"
,
element
:
<
Buckets
/>
}
];
];
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