Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scientia
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
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Zhige Yu
scientia
Commits
f3dcfb40
Commit
f3dcfb40
authored
4 years ago
by
danieldeng2
Browse files
Options
Downloads
Patches
Plain Diff
Use separate router switch for leftbar
parent
1617a062
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/components/pages/StandardView/index.tsx
+27
-15
27 additions, 15 deletions
frontend/src/components/pages/StandardView/index.tsx
with
27 additions
and
15 deletions
frontend/src/components/pages/StandardView/index.tsx
+
27
−
15
View file @
f3dcfb40
...
...
@@ -36,46 +36,58 @@ const StandardView: React.FC<StandardViewProps> = ({
toggledRight
:
toggledRight
,
})
}
>
<
Switch
>
<
Route
path
=
"/modules/:id"
>
<
LeftBarModule
/>
</
Route
>
<
Route
exact
path
=
"/modules"
>
<
LeftBarModuleList
/>
</
Route
>
<
Route
path
=
"/"
>
<
LeftBarHome
/>
</
Route
>
</
Switch
>
<
RightBar
/>
<
div
id
=
"sidenav-overlay"
onClick
=
{
(
e
)
=>
onOverlayClick
(
e
)
}
></
div
>
<
Switch
>
<
Route
path
=
"/home"
>
<
LeftBarHome
/>
<
ExamplePage
name
=
"Home"
/>
</
Route
>
<
Route
exact
path
=
"/modules"
>
<
LeftBarModuleList
/>
<
Route
exact
path
=
"/modules"
>
<
ModuleList
/>
</
Route
>
<
Route
path
=
"/modules/:id/overview"
>
<
LeftBarModule
/>
<
Route
path
=
"/modules/:id/overview"
>
<
ModuleOverview
/>
</
Route
>
<
Route
path
=
"/modules/:id/materials"
>
<
LeftBarModule
/>
<
Route
path
=
"/modules/:id/materials"
>
<
ModuleMaterials
/>
</
Route
>
<
Route
path
=
"/modules/:id/coursework"
>
<
LeftBarModule
/>
<
Route
path
=
"/modules/:id/coursework"
>
<
ModuleCoursework
/>
</
Route
>
<
Route
path
=
"/modules/:id"
render
=
{
props
=>
<
Redirect
to
=
{
`/modules/
${
props
.
match
.
params
.
id
}
/overview`
}
/>
}
/>
<
Route
path
=
"/timetable"
>
<
LeftBarHome
/>
<
Route
path
=
"/timetable"
>
<
ExamplePage
name
=
"Timetable"
/>
</
Route
>
<
Route
path
=
"/exams"
>
<
LeftBarHome
/>
<
Route
path
=
"/exams"
>
<
ExamplePage
name
=
"Exams"
/>
</
Route
>
<
Route
path
=
"/modules/:id"
render
=
{
(
props
)
=>
(
<
Redirect
to
=
{
`/modules/
${
props
.
match
.
params
.
id
}
/overview`
}
/>
)
}
/>
<
Route
path
=
"/"
render
=
{
()
=>
<
Redirect
to
=
"/home"
/>
}
/>
</
Switch
>
</
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