Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PB138 - Film Database Group Project
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tomáš Havlíček
PB138 - Film Database Group Project
Commits
65d97d59
There was an error fetching the commit references. Please try again later.
Commit
65d97d59
authored
2 years ago
by
Tomáš Havlíček
Browse files
Options
Downloads
Patches
Plain Diff
feat: routing finished
parent
b18c6ae5
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
frontend/src/App.tsx
+5
-2
5 additions, 2 deletions
frontend/src/App.tsx
frontend/src/components/NavigationBar.tsx
+4
-4
4 additions, 4 deletions
frontend/src/components/NavigationBar.tsx
frontend/src/main.tsx
+3
-0
3 additions, 0 deletions
frontend/src/main.tsx
with
12 additions
and
6 deletions
frontend/src/App.tsx
+
5
−
2
View file @
65d97d59
...
...
@@ -8,19 +8,22 @@ import { About } from "./components/About";
import
React
from
"
react
"
;
import
{
Browse
}
from
"
./components/Browse
"
;
import
{
Search
}
from
"
./components/Search
"
;
import
{
ErrorPage
}
from
"
./components/ErrorPage
"
;
function
App
()
{
return
(
<
div
className
=
"app"
>
<
NavigationBar
/>
<
BrowserRouter
>
<
Routes
>
<
Route
path
=
"/"
element
=
{
<
MainPage
/>
}
></
Route
>
<
Route
path
=
"/browse"
element
=
{
<
Browse
/>
}
></
Route
>
<
Route
path
=
"/search"
element
=
{
<
Search
/>
}
></
Route
>
<
Route
path
=
"/about"
element
=
{
<
About
/>
}
></
Route
>
<
Route
path
=
"*"
element
=
{
<
ErrorPage
/>
}
></
Route
>
</
Routes
>
</
BrowserRouter
>
</
div
>
);
}
...
...
This diff is collapsed.
Click to expand it.
frontend/src/components/NavigationBar.tsx
+
4
−
4
View file @
65d97d59
...
...
@@ -12,10 +12,10 @@ export const NavigationBar = () => {
<
Menu
theme
=
"dark"
mode
=
"horizontal"
defaultSelectedKeys
=
{
[
"
2
"
]
}
>
<
Image
src
=
{
logo
}
width
=
{
50
}
></
Image
>
<
Menu
.
Item
>
Home
</
Menu
.
Item
>
<
Menu
.
Item
>
Browse
</
Menu
.
Item
>
<
Menu
.
Item
>
Search
</
Menu
.
Item
>
<
Menu
.
Item
>
About
</
Menu
.
Item
>
<
Link
to
=
"/"
>
<
Menu
.
Item
>
Home
</
Menu
.
Item
>
</
Link
>
<
Link
to
=
"/browse"
>
<
Menu
.
Item
>
Browse
</
Menu
.
Item
>
</
Link
>
<
Link
to
=
"/search"
>
<
Menu
.
Item
>
Search
</
Menu
.
Item
>
</
Link
>
<
Link
to
=
"/about"
>
<
Menu
.
Item
>
About
</
Menu
.
Item
>
</
Link
>
</
Menu
>
</
Header
>
</
div
>)
...
...
This diff is collapsed.
Click to expand it.
frontend/src/main.tsx
+
3
−
0
View file @
65d97d59
import
React
from
'
react
'
import
ReactDOM
from
'
react-dom/client
'
import
{
BrowserRouter
}
from
'
react-router-dom
'
import
App
from
'
./App
'
import
'
./index.css
'
ReactDOM
.
createRoot
(
document
.
getElementById
(
'
root
'
)
!
).
render
(
<
React
.
StrictMode
>
<
BrowserRouter
>
<
App
/>
</
BrowserRouter
>
</
React
.
StrictMode
>
)
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