Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
SigNoz
Commits
43369bde
Unverified
Commit
43369bde
authored
3 years ago
by
Yash Joshi
Committed by
GitHub
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
fix(routes): update key and redirect home to application (#342)
parent
da5bf3ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/AppRoutes/index.tsx
+6
-4
frontend/src/AppRoutes/index.tsx
with
6 additions
and
4 deletions
+6
-4
frontend/src/AppRoutes/index.tsx
+
6
-
4
View file @
43369bde
import
NotFound
from
'
components/NotFound
'
;
import
Spinner
from
'
components/Spinner
'
;
import
ROUTES
from
'
constants/routes
'
;
import
AppLayout
from
'
container/AppLayout
'
;
import
history
from
'
lib/history
'
;
import
React
,
{
Suspense
}
from
'
react
'
;
import
{
Route
,
Router
,
Switch
}
from
'
react-router-dom
'
;
import
{
Redirect
,
Route
,
Router
,
Switch
,
}
from
'
react-router-dom
'
;
import
routes
from
'
./routes
'
;
...
...
@@ -12,12 +13,13 @@ const App = (): JSX.Element => (
<
AppLayout
>
<
Suspense
fallback
=
{
<
Spinner
size
=
"large"
tip
=
"Loading..."
/>
}
>
<
Switch
>
{
routes
.
map
(({
path
,
component
,
exact
}
,
index
)
=>
{
{
routes
.
map
(({
path
,
component
,
exact
})
=>
{
return
(
<
Route
key
=
{
index
}
exact
=
{
exact
}
path
=
{
path
}
component
=
{
component
}
/>
<
Route
key
=
{
path
}
exact
=
{
exact
}
path
=
{
path
}
component
=
{
component
}
/>
);
})
}
<
Route
path
=
"*"
exact
component
=
{
NotFound
}
/>
<
Redirect
from
=
"/"
to
=
{
ROUTES
.
APPLICATION
}
/>
<
Route
component
=
{
NotFound
}
/>
</
Switch
>
</
Suspense
>
</
AppLayout
>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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