-
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.
Merge branch 'develop' of https://github.com/woowacourse-teams/2024-h…
…aeng-dong into feature/#61
- Loading branch information
Showing
23 changed files
with
301 additions
and
172 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,34 @@ | ||
name: frontend-pull-request | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
branches: [main, develop] | ||
paths: | ||
- 'client/**' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./client | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20.15.1' | ||
|
||
- name: Install dependencies | ||
working-directory: ./client | ||
run: npm install | ||
|
||
- name: Run lint | ||
working-directory: ./client | ||
run: npm run lint |
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" | ||
} | ||
} |
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
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', | ||
}); | ||
}; |
3 changes: 2 additions & 1 deletion
3
client/src/components/Modal/SetActionModalContent/SetActionModalContent.tsx
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
1 change: 1 addition & 0 deletions
1
client/src/components/Modal/SetActionModalContent/SetPurchase.tsx
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,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
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