-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 행사 생성 페이지 디자인시스템 적용 * design : index.css 수정 * feat: 행사 생성 api 연결 * style: lint 적용
- Loading branch information
Showing
18 changed files
with
182 additions
and
165 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 |
---|---|---|
|
@@ -9,4 +9,4 @@ | |
"jsxSingleQuote": false, | ||
"bracketSpacing": false, | ||
"proseWrap": "preserve" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,12 @@ | ||
import {HDesignProvider} from 'haengdong-design'; | ||
import {Outlet} from 'react-router-dom'; | ||
|
||
const App: React.FC = () => { | ||
return <Outlet />; | ||
return ( | ||
<HDesignProvider> | ||
<Outlet /> | ||
</HDesignProvider> | ||
); | ||
}; | ||
|
||
export default App; |
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,13 @@ | ||
import {requestPost} from './fetcher'; | ||
|
||
interface RequestPostEventProps { | ||
name: string; | ||
} | ||
|
||
export const requestPostEvent = async ({name}: RequestPostEventProps) => { | ||
requestPost({ | ||
headers: {'Content-Type': 'application/json'}, | ||
body: {name}, | ||
endpoint: '/api/events', | ||
}); | ||
}; |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
export const ROUTER_URLS = { | ||
main: '', | ||
createEvent: '/create-event', | ||
completeCreateEvent: '/create-event/complete', | ||
eventCreateName: '/event/create/name', | ||
eventCreateComplete: '/event/create/complete', | ||
event: '/event', | ||
eventManage: '/event/:eventId', | ||
}; |
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 |
---|---|---|
@@ -1,5 +1,9 @@ | ||
body { | ||
max-width: 768px; | ||
height: 100lvh; | ||
margin: 0 auto; | ||
border: 1px solid gray; | ||
} | ||
|
||
section { | ||
width: 100%; | ||
} |
This file was deleted.
Oops, something went wrong.
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,36 @@ | ||
import {useState} from 'react'; | ||
import {useNavigate} from 'react-router-dom'; | ||
import {FixedButton, Input, MainLayout, TextButton, Title, TopNav} from 'haengdong-design'; | ||
|
||
import {requestPostEvent} from '@apis/requestPostEvent'; | ||
|
||
import {ROUTER_URLS} from '@constants/routerUrls'; | ||
|
||
const CreateEvent = () => { | ||
const [eventTitle, setEventTitle] = useState(''); | ||
const navigate = useNavigate(); | ||
|
||
const submitEventTitle = async (event: React.FormEvent<HTMLFormElement>) => { | ||
event.preventDefault(); | ||
const result = await requestPostEvent({name: eventTitle}); | ||
|
||
navigate(`${ROUTER_URLS.eventCreateComplete}?${new URLSearchParams({title: eventTitle})}`); | ||
}; | ||
|
||
return ( | ||
<MainLayout> | ||
<TopNav navType="back" /> | ||
<Title title="행사 이름 입력" description="시작할 행사 이름을 입력해 주세요." /> | ||
<form onSubmit={submitEventTitle}> | ||
<Input | ||
value={eventTitle} | ||
onChange={event => setEventTitle(event.target.value)} | ||
placeholder="ex) 행동대장 야유회" | ||
/> | ||
<FixedButton>행동 개시!</FixedButton> | ||
</form> | ||
</MainLayout> | ||
); | ||
}; | ||
|
||
export default CreateEvent; |
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,2 @@ | ||
export {default as CreateNamePage} from './Name'; | ||
export {default as CreateCompletePage} from './Complete'; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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