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
Today KU
Commits
610b2d7b
Commit
610b2d7b
authored
Oct 13, 2021
by
Kim, Subin
Browse files
location.state로 날짜 정보 넘겨주기 준비
parent
a22701a5
Changes
2
Show whitespace changes
Inline
Side-by-side
client/src/components/Buttons/EditBtn.js
View file @
610b2d7b
...
@@ -3,7 +3,10 @@ import styles from "./buttons.module.scss";
...
@@ -3,7 +3,10 @@ import styles from "./buttons.module.scss";
const
EditBtn
=
({
pathname
})
=>
{
const
EditBtn
=
({
pathname
})
=>
{
return
(
return
(
<
Link
className
=
{
`position-absolute
${
styles
.
editBtn
}
`
}
to
=
{
"
/
"
+
pathname
}
>
<
Link
className
=
{
`position-absolute
${
styles
.
editBtn
}
`
}
to
=
{{
pathname
:
"
/
"
+
pathname
,
state
:
{}
}}
>
<
i
className
=
{
`bi bi-plus-circle
${
styles
.
icon
}
`
}
><
/i
>
<
i
className
=
{
`bi bi-plus-circle
${
styles
.
icon
}
`
}
><
/i
>
<
/Link
>
<
/Link
>
)
)
...
...
client/src/components/Form/ScheduleForm.js
View file @
610b2d7b
import
{
useState
,
useEffect
}
from
"
react
"
;
import
{
useState
,
useEffect
}
from
"
react
"
;
import
{
Redirect
}
from
"
react-router-dom
"
;
import
{
Redirect
,
useLocation
}
from
"
react-router-dom
"
;
import
BtnGroup
from
"
../Buttons/BtnGroup.js
"
;
import
BtnGroup
from
"
../Buttons/BtnGroup.js
"
;
import
catchErrors
from
"
../../utils/catchErrors.js
"
;
import
catchErrors
from
"
../../utils/catchErrors.js
"
;
import
styles
from
"
./form.module.scss
"
;
import
styles
from
"
./form.module.scss
"
;
const
ScheduleForm
=
()
=>
{
const
ScheduleForm
=
()
=>
{
const
location
=
useLocation
()
const
[
schedule
,
setSchedule
]
=
useState
({
const
[
schedule
,
setSchedule
]
=
useState
({
title
:
""
,
title
:
""
,
startDate
:
""
,
startDate
:
""
,
...
...
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