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
Hide 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';
...
@@ -3,7 +3,6 @@ import React, { useState, useEffect } from 'react';
import
{
Link
,
Redirect
}
from
'
react-router-dom
'
;
import
{
Link
,
Redirect
}
from
'
react-router-dom
'
;
import
styled
from
'
styled-components
'
;
import
styled
from
'
styled-components
'
;
import
{
Navbar
,
Nav
,
NavLink
}
from
'
react-bootstrap
'
;
import
{
Navbar
,
Nav
,
NavLink
}
from
'
react-bootstrap
'
;
import
axios
from
'
axios
'
;
const
MENU
=
styled
(
Navbar
)
`
const
MENU
=
styled
(
Navbar
)
`
background-color: #7B031D;
background-color: #7B031D;
...
...
server/client/src/Pages/ACheckPage.js
View file @
98a2dd97
...
@@ -2,7 +2,6 @@ import React, { useState, useEffect } from 'react';
...
@@ -2,7 +2,6 @@ import React, { useState, useEffect } from 'react';
import
Menu
from
'
../Components/Menu
'
;
import
Menu
from
'
../Components/Menu
'
;
import
axios
from
'
axios
'
;
import
axios
from
'
axios
'
;
import
{
Link
,
Redirect
}
from
'
react-router-dom
'
;
import
{
Link
,
Redirect
}
from
'
react-router-dom
'
;
import
'
bootstrap/dist/css/bootstrap.css
'
;
function
ACheck
(
props
)
{
function
ACheck
(
props
)
{
const
[
state
,
setState
]
=
useState
()
const
[
state
,
setState
]
=
useState
()
...
...
server/client/src/Pages/ApplyPage.js
View file @
98a2dd97
...
@@ -2,7 +2,6 @@ import React, { useState, useEffect } from 'react';
...
@@ -2,7 +2,6 @@ import React, { useState, useEffect } from 'react';
import
{
Formik
,
Field
,
ErrorMessage
,
FieldArray
}
from
'
formik
'
;
import
{
Formik
,
Field
,
ErrorMessage
,
FieldArray
}
from
'
formik
'
;
import
Menu
from
'
../Components/Menu
'
;
import
Menu
from
'
../Components/Menu
'
;
import
axios
from
'
axios
'
;
import
axios
from
'
axios
'
;
import
'
bootstrap/dist/css/bootstrap.css
'
;
import
*
as
Yup
from
'
yup
'
;
import
*
as
Yup
from
'
yup
'
;
import
{
Redirect
}
from
'
react-router-dom
'
;
import
{
Redirect
}
from
'
react-router-dom
'
;
...
...
server/client/src/Pages/CheckPage.js
View file @
98a2dd97
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
Menu
from
'
../Components/Menu
'
;
import
Menu
from
'
../Components/Menu
'
;
import
axios
from
'
axios
'
;
import
axios
from
'
axios
'
;
import
'
bootstrap/dist/css/bootstrap.css
'
;
function
Check
(
props
)
{
function
Check
(
props
)
{
const
[
reserve
,
setReserve
]
=
useState
([]);
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';
...
@@ -6,11 +6,24 @@ import { Container, Row, Col, Card, Accordion, Button } from 'react-bootstrap';
function
Notice
()
{
function
Notice
()
{
const
[
notices
,
setNotices
]
=
useState
([]);
const
[
notices
,
setNotices
]
=
useState
([]);
const
[
user
,
setUser
]
=
useState
({
role
:
""
})
useEffect
(()
=>
{
useEffect
(()
=>
{
acheck
();
getNotice
();
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
)
{
function
dateForm
(
day
)
{
const
post_day
=
new
Date
(
day
);
const
post_day
=
new
Date
(
day
);
let
year
=
post_day
.
getFullYear
();
let
year
=
post_day
.
getFullYear
();
...
@@ -42,7 +55,10 @@ function Notice() {
...
@@ -42,7 +55,10 @@ function Notice() {
<
Container
fluid
>
<
Container
fluid
>
<
Row
className
=
"
justify-content-center vw-100 vh-90
"
>
<
Row
className
=
"
justify-content-center vw-100 vh-90
"
>
<
Col
md
=
{
7
}
>
<
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
>
<
Accordion
>
{
notices
.
map
((
notice
,
index
)
=>
{
notices
.
map
((
notice
,
index
)
=>
<
Card
>
<
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