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
98a2dd97
Commit
98a2dd97
authored
Nov 03, 2020
by
Choi Ga Young
Browse files
버튼숨기기
parent
670561f7
Changes
5
Show whitespace changes
Inline
Side-by-side
server/client/src/Components/Menu.js
View file @
98a2dd97
...
...
@@ -3,7 +3,6 @@ import React, { useState, useEffect } from 'react';
import
{
Link
,
Redirect
}
from
'
react-router-dom
'
;
import
styled
from
'
styled-components
'
;
import
{
Navbar
,
Nav
,
NavLink
}
from
'
react-bootstrap
'
;
import
axios
from
'
axios
'
;
const
MENU
=
styled
(
Navbar
)
`
background-color: #7B031D;
...
...
server/client/src/Pages/ACheckPage.js
View file @
98a2dd97
...
...
@@ -2,7 +2,6 @@ import React, { useState, useEffect } from 'react';
import
Menu
from
'
../Components/Menu
'
;
import
axios
from
'
axios
'
;
import
{
Link
,
Redirect
}
from
'
react-router-dom
'
;
import
'
bootstrap/dist/css/bootstrap.css
'
;
function
ACheck
(
props
)
{
const
[
state
,
setState
]
=
useState
()
...
...
server/client/src/Pages/ApplyPage.js
View file @
98a2dd97
...
...
@@ -2,7 +2,6 @@ import React, { useState, useEffect } from 'react';
import
{
Formik
,
Field
,
ErrorMessage
,
FieldArray
}
from
'
formik
'
;
import
Menu
from
'
../Components/Menu
'
;
import
axios
from
'
axios
'
;
import
'
bootstrap/dist/css/bootstrap.css
'
;
import
*
as
Yup
from
'
yup
'
;
import
{
Redirect
}
from
'
react-router-dom
'
;
...
...
server/client/src/Pages/CheckPage.js
View file @
98a2dd97
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
Menu
from
'
../Components/Menu
'
;
import
axios
from
'
axios
'
;
import
'
bootstrap/dist/css/bootstrap.css
'
;
function
Check
(
props
)
{
const
[
reserve
,
setReserve
]
=
useState
([]);
...
...
server/client/src/Pages/NoticePage.js
View file @
98a2dd97
...
...
@@ -6,11 +6,24 @@ import { Container, Row, Col, Card, Accordion, Button } from 'react-bootstrap';
function
Notice
()
{
const
[
notices
,
setNotices
]
=
useState
([]);
const
[
user
,
setUser
]
=
useState
({
role
:
""
})
useEffect
(()
=>
{
acheck
();
getNotice
();
},
[]);
function
acheck
()
{
axios
.
get
(
`/users/
${
localStorage
.
getItem
(
'
_id
'
)}
`
)
.
then
(
res
=>
{
if
(
res
.
data
.
role
==
"
admin
"
)
{
setUser
(
res
.
data
)
}
}).
catch
(
err
=>
{
alert
(
err
.
error
)
});
}
function
dateForm
(
day
)
{
const
post_day
=
new
Date
(
day
);
let
year
=
post_day
.
getFullYear
();
...
...
@@ -42,7 +55,10 @@ function Notice() {
<
Container
fluid
>
<
Row
className
=
"
justify-content-center vw-100 vh-90
"
>
<
Col
md
=
{
7
}
>
<
h2
className
=
"
p-3 border-bottom
"
>
공지사항
<
Link
to
=
"
/write
"
>
글
작성
<
/Link></
h2
>
<
h2
className
=
"
p-3 border-bottom
"
>
공지사항
{
user
.
role
===
"
admin
"
?
(
<
Link
to
=
"
/write
"
>
글
작성
<
/Link>
)
: null}</
h2
>
<
Accordion
>
{
notices
.
map
((
notice
,
index
)
=>
<
Card
>
...
...
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