Skip to content

Commit

Permalink
[#123] feat: feat study modify
Browse files Browse the repository at this point in the history
  • Loading branch information
eunyeong1113 committed Feb 17, 2022
1 parent 898d413 commit fd77aa5
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 123 deletions.
11 changes: 11 additions & 0 deletions src/components/datepickerEnd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React, { useState } from "react";
import * as dataFns from "date-fns";
import "../statics/css/datepickerStart.css";

export default function StudyDatePickerEnd({studyRecruitEnd}) {
const [date, setDate] = useState(Date.parse(studyRecruitEnd));

return (
<div className="datepicker-start">{dataFns.format(date, "yyyy/MM/dd")}</div>
);
}
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ReactDOM.render(
element={isLogin() ? <StudyRecruitCreate /> : <Login />}
/>
<Route
path="studyrecruit/modify"
path="studyrecruitmodify/:studyseq"
element={isLogin() ? <StudyRecruitModify /> : <Login />}
/>
<Route
Expand Down
8 changes: 3 additions & 5 deletions src/pages/studyRecruitDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function StudyRecruitDetail() {
};

function checkAxios(){
if(isDeleteSuccess&&isRecruitSuccess){
if(isDeleteSuccess===200 && isRecruitSuccess===200){
return true;
}else{
return false;
Expand Down Expand Up @@ -197,8 +197,7 @@ export default function StudyRecruitDetail() {
}

const sendData={
data:data,

studyData:data.apidata
};

return (
Expand Down Expand Up @@ -244,9 +243,8 @@ export default function StudyRecruitDetail() {
<div className="studyrecruit-detail-box-heading__first-host">
{/* [TODO]: update, delete 페이지로 링크 필요 */}
<Link
to={'/studyrecruit/modify'}
to={`/studyrecruitmodify/${studyseq}`}
className="studyrecruit-detail-box-heading__first-host-btn update"
state={{}}
>
수정
</Link>
Expand Down
Loading

0 comments on commit fd77aa5

Please sign in to comment.