Commit 610b2d7b authored by Kim, Subin's avatar Kim, Subin
Browse files

location.state로 날짜 정보 넘겨주기 준비

parent a22701a5
...@@ -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>
) )
......
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: "",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment