Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
reservation-service
Commits
3df803a8
Commit
3df803a8
authored
Nov 03, 2020
by
Ha YeaJin
Browse files
menu RBS 끝
parent
13004059
Changes
3
Show whitespace changes
Inline
Side-by-side
server/client/src/Components/Menu.js
View file @
3df803a8
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
{
Link
,
Redirect
}
from
'
react-router-dom
'
;
import
styled
from
'
styled-components
'
;
import
{
Navbar
,
Nav
,
NavDropdown
}
from
'
react-bootstrap
'
;
import
{
Navbar
,
Nav
,
NavDropdown
,
NavLink
}
from
'
react-bootstrap
'
;
const
MENU
=
styled
(
Navbar
)
`
background-color: #7B031D;
a {
color : white;
}
`
function
Menu
()
{
...
...
@@ -25,76 +28,37 @@ function Menu() {
<
Navbar
.
Toggle
aria
-
controls
=
"
basic-navbar-nav
"
/>
<
Navbar
.
Collapse
id
=
"
basic-navbar-nav
"
>
<
Nav
className
=
"
mr-auto
"
>
<
Nav
.
Link
><
Link
to
=
"
/notice
"
>
공지사항
<
/Link></
Nav
.
Link
>
<
Nav
.
Link
><
Link
to
=
"
/home
"
>
대관
현황
<
/Link></
Nav
.
Link
>
<
Nav
.
Link
><
Link
to
=
{{
<
NavLink
as
=
{
Link
}
to
=
"
/notice
"
>
공지사항
<
/NavLink
>
<
NavLink
as
=
{
Link
}
to
=
"
/home
"
>
대관
현황
<
/NavLink
>
<
NavLink
as
=
{
Link
}
to
=
{{
pathname
:
`/apply/
${
localStorage
.
getItem
(
'
_id
'
)}
`
,
state
:
{
id
:
localStorage
.
getItem
(
'
_id
'
)
},
}}
className
=
"
nav-link
"
>
대관
신청
<
/Link></
Nav
.
Link
>
<
Nav
.
Link
><
Link
to
=
{{
}}
className
=
"
nav-link
"
>
대관
신청
<
/NavLink
>
<
NavLink
as
=
{
Link
}
to
=
{{
pathname
:
`/check/
${
localStorage
.
getItem
(
'
_id
'
)}
`
,
state
:
{
id
:
localStorage
.
getItem
(
'
_id
'
)
},
}}
className
=
"
nav-link
"
>
대관
확인
/
취소
<
/Link></
Nav
.
Link
>
<
Nav
.
Link
><
Link
to
=
{{
대관
확인
/
취소
<
/NavLink
>
<
NavLink
as
=
{
Link
}
to
=
{{
pathname
:
`/acheck/
${
localStorage
.
getItem
(
'
_id
'
)}
`
,
state
:
{
id
:
localStorage
.
getItem
(
'
_id
'
)
},
}}
className
=
"
nav-link
"
>
대관
확인
/
취소
(
관리자
)
<
/Link></
Nav
.
Link
>
<
Nav
.
Link
>
<
div
className
=
"
text-white text-right font-weight-light
"
><
small
>
{
name
}
님
<
/small></
div
>
<
div
className
=
"
text-white text-right font-weight-light
"
><
small
>
<
Link
to
=
{{
대관
확인
/
취소
(
관리자
)
<
/NavLink
>
<
/Nav
>
<
Nav
>
<
NavLink
>
<
small
className
=
"
d-flex flex-row justify-content-end
"
>
<
div
className
=
"
text-white text-right font-weight-light pr-2
"
>
{
name
}
님
<
/div
>
<
NavLink
className
=
"
p-0
"
as
=
{
Link
}
to
=
{{
pathname
:
`/change/
${
localStorage
.
getItem
(
'
_id
'
)}
`
,
state
:
{
id
:
localStorage
.
getItem
(
'
_id
'
)
},
}}
>
비밀번호
변경
<
/Link> /
<
span
className
=
"
logoutBtn
"
onClick
=
{
logout
}
>
로그아웃
<
/
span
></
small
>
<
/div
>
<
/Nav
.
Link
>
}}
>
비밀번호
변경
<
/
Nav
Link> /
<
NavLink
className
=
"
p-0
"
onClick
=
{
logout
}
>
로그아웃
<
/
NavLink
></
small
>
<
/NavLink
>
<
/Nav
>
<
/Navbar.Collapse
>
{
/* <button className="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar" aria-controls="collapsibleNavbar">
<span className="navbar-toggler-icon"></span>
</button> */
}
{
/* <div className="collapse navbar-collapse justify-content-between" id="collapsibleNavbar">
<ul className="navbar-nav">
<li className="nav-item">
<Link to="/notice" className="nav-link">공지사항</Link>
</li>
<li className="nav-item">
<Link to="/home" className="nav-link">대관 현황</Link>
</li>
<li className="nav-item">
<Link to={{
pathname: `/apply/${localStorage.getItem('_id')}`,
state: { id: localStorage.getItem('_id') },
}} className="nav-link">대관 신청</Link>
</li>
<li className="nav-item">
<Link to={{
pathname: `/check/${localStorage.getItem('_id')}`,
state: { id: localStorage.getItem('_id') },
}} className="nav-link">
대관 확인/취소</Link>
</li>
<li className="nav-item">
<Link to={{
pathname: `/acheck/${localStorage.getItem('_id')}`,
state: { id: localStorage.getItem('_id') },
}} className="nav-link">
대관 확인/취소(관리자)</Link>
</li>
</ul>
<div className="h-100 mr-3">
<div className="text-white text-right font-weight-light"><small>{name}님 안녕하세요</small></div>
<div className="text-white text-right font-weight-light"><small>
<Link to={{
pathname: `/change/${localStorage.getItem('_id')}`,
state: { id: localStorage.getItem('_id') },
}}>비밀번호 변경</Link> / <span className="logoutBtn" onClick={logout} >로그아웃</span></small></div>
</div>
</div> */
}
<
/MENU
>
)
}
...
...
server/client/src/Pages/NoticePage.js
View file @
3df803a8
...
...
@@ -28,7 +28,7 @@ function Notice() {
axios
.
get
(
`/notices`
)
.
then
(
res
=>
{
if
(
res
.
status
!==
201
)
{
alert
(
res
.
data
.
error
);
//
alert(res.data.error);
}
setNotices
(
res
.
data
);
})
...
...
server/routes/notices.js
View file @
3df803a8
...
...
@@ -10,6 +10,7 @@ router.get('/', function (req, res, next) {
})
.
catch
((
err
)
=>
{
console
.
error
(
err
);
next
(
err
);
});
});
...
...
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