-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 회의실 만들기 api 작성 * refactor: react-hook-form 구조 변경 * feat: useStep hook 작성 * feat: date. time의 format 유틸 함수 작성 * feat: 문구 수정 및 주석 삭제 * feat: 회의실 생성 완료 시 액션 추가
- Loading branch information
1 parent
2aeed7d
commit 5066dde
Showing
10 changed files
with
260 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './meetingRoomApi'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { api } from '../axois'; | ||
|
||
export const meetingRoomApi = { | ||
// 회의실 만들기 | ||
CREATE_MEETING_ROOM: ({ | ||
token, | ||
title, | ||
location, | ||
startTime, | ||
description, | ||
estimatedTotalDuration, | ||
imageNum | ||
}: { | ||
token: string | null; | ||
title: string; | ||
location?: string; | ||
startTime: string; | ||
description?: string; | ||
estimatedTotalDuration: string; | ||
imageNum: number; | ||
}) => | ||
api.post( | ||
'/api/meetings', | ||
{ | ||
title, | ||
location, | ||
startTime, | ||
description, | ||
estimatedTotalDuration, | ||
imageNum | ||
}, | ||
{ | ||
headers: { | ||
Authorization: token | ||
} | ||
} | ||
) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { useState } from 'react'; | ||
|
||
const stepList = [ | ||
{ | ||
id: 0, | ||
name: '회의 이름' | ||
}, | ||
{ | ||
id: 1, | ||
name: '회의 날짜 및 시간' | ||
}, | ||
{ | ||
id: 2, | ||
name: '회의 장소' | ||
} | ||
]; | ||
|
||
export const useStep = () => { | ||
const [currentStep, setCurrentStep] = useState<number>(1); | ||
|
||
const prevStep = () => { | ||
setCurrentStep((prev) => prev - 1); | ||
}; | ||
|
||
const nextStep = () => { | ||
setCurrentStep((prev) => prev + 1); | ||
}; | ||
|
||
return { stepList, currentStep, prevStep, nextStep }; | ||
}; |
Oops, something went wrong.