Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
final-exam
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nawasan Wisitsingkhon
final-exam
Commits
85145f0b
Commit
85145f0b
authored
Oct 02, 2023
by
Nawasan Wisitsingkhon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update navbar
parent
9d4c40e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
19 deletions
+12
-19
README.md
README.md
+0
-1
Navbar.js
src/components/Navbar.js
+12
-18
No files found.
README.md
View file @
85145f0b
...
@@ -5,7 +5,6 @@ final exam of web programming with ~~PHP~~ **JavaScript** and using ~~Framework~
...
@@ -5,7 +5,6 @@ final exam of web programming with ~~PHP~~ **JavaScript** and using ~~Framework~
... and MVC
... and MVC
<p
align=
"center"
>
<p
align=
"center"
>
<img
alt=
"Github License"
src=
"https://img.shields.io/github/license/nawasan111/final-exam"
/>
<img
alt=
"GitHub Top Language"
src=
"https://img.shields.io/github/languages/top/nawasan111/final-exam"
/>
<img
alt=
"GitHub Top Language"
src=
"https://img.shields.io/github/languages/top/nawasan111/final-exam"
/>
<img
alt=
""
src=
"https://img.shields.io/github/repo-size/nawasan111/final-exam"
/>
<img
alt=
""
src=
"https://img.shields.io/github/repo-size/nawasan111/final-exam"
/>
<img
alt=
"GitHub Issues"
src=
"https://img.shields.io/github/issues/nawasan111/final-exam"
/>
<img
alt=
"GitHub Issues"
src=
"https://img.shields.io/github/issues/nawasan111/final-exam"
/>
...
...
src/components/Navbar.js
View file @
85145f0b
...
@@ -65,20 +65,9 @@ function Navbar(props) {
...
@@ -65,20 +65,9 @@ function Navbar(props) {
const
[
anchorEl
,
setAnchorEl
]
=
React
.
useState
(
null
);
const
[
anchorEl
,
setAnchorEl
]
=
React
.
useState
(
null
);
const
[
mobileMoreAnchorEl
,
setMobileMoreAnchorEl
]
=
React
.
useState
(
null
);
const
[
mobileMoreAnchorEl
,
setMobileMoreAnchorEl
]
=
React
.
useState
(
null
);
const
[
mobileOpen
,
setMobileOpen
]
=
React
.
useState
(
false
);
const
[
mobileOpen
,
setMobileOpen
]
=
React
.
useState
(
false
);
const
handleDrawerToggle
=
()
=>
{
setMobileOpen
(
!
mobileOpen
);
};
const
isMenuOpen
=
Boolean
(
anchorEl
);
const
isMenuOpen
=
Boolean
(
anchorEl
);
const
isMobileMenuOpen
=
Boolean
(
mobileMoreAnchorEl
);
const
isMobileMenuOpen
=
Boolean
(
mobileMoreAnchorEl
);
const
container
=
window
!==
undefined
?
()
=>
window
().
document
.
body
:
undefined
;
const
handleProfileMenuOpen
=
(
event
)
=>
{
setAnchorEl
(
event
.
currentTarget
);
};
const
handleMobileMenuClose
=
()
=>
{
const
handleMobileMenuClose
=
()
=>
{
setMobileMoreAnchorEl
(
null
);
setMobileMoreAnchorEl
(
null
);
};
};
...
@@ -180,18 +169,23 @@ function Navbar(props) {
...
@@ -180,18 +169,23 @@ function Navbar(props) {
]
]
:
[
:
[
{
{
label
:
"
Register
"
,
label
:
""
,
element
:
(
element
:
(
<
span
className
=
"inline-block mx-3 hover:underline"
>
Register
<
/span
>
<
span
className
=
"inline-block mx-3 hover:underline"
>
เข้าสู่ระบบ
<
/span
>
),
),
link
:
"/
register
"
,
link
:
"/
login
"
,
},
},
{
{
lab
le
:
"Login
"
,
lab
el
:
"
"
,
element
:
(
element
:
(
<
span
className
=
"inline-block mx-3 hover:underline"
>
Login
<
/span
>
<
span
className
=
"inline-block mx-3 hover:underline"
>
สมัครสมาชิก
<
/span
>
),
),
link
:
"/
login
"
,
link
:
"/
register
"
,
},
},
];
];
...
@@ -262,7 +256,7 @@ function Navbar(props) {
...
@@ -262,7 +256,7 @@ function Navbar(props) {
<
Box
sx
=
{{
flexGrow
:
1
}}
/
>
<
Box
sx
=
{{
flexGrow
:
1
}}
/
>
<
Box
sx
=
{{
display
:
{
xs
:
"none"
,
md
:
"flex"
}
}}
>
<
Box
sx
=
{{
display
:
{
xs
:
"none"
,
md
:
"flex"
}
}}
>
{
MenuList
.
map
((
menu
,
idx
)
=>
(
{
MenuList
.
map
((
menu
,
idx
)
=>
(
<
Link
className
=
"text-white"
key
=
{
idx
}
href
=
{
menu
.
link
}
>
<
Link
title
=
{
menu
.
label
}
className
=
"text-white"
key
=
{
idx
}
href
=
{
menu
.
link
}
>
<
span
>
{
menu
.
element
}
<
/span
>
<
span
>
{
menu
.
element
}
<
/span
>
<
/Link
>
<
/Link
>
))}
))}
...
...
Write
Preview
Markdown
is supported
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