-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Feat: webpack proxy 설정, axiosConfig 추가, api 추가
- Loading branch information
1 parent
a563493
commit f5bb124
Showing
12 changed files
with
113 additions
and
32 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
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,11 @@ | ||
import Axios from 'axios'; | ||
|
||
export const axiosInstance = Axios.create({ | ||
// baseURL: 'http://-forward-load-balancer-1892345872.us-west-2.elb.amazonaws.com/', | ||
baseURL: '/api', | ||
headers: { | ||
'Content-Type': 'application/json;charset=UTF-8', | ||
}, | ||
}); | ||
|
||
export default axiosInstance; |
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,15 @@ | ||
import axiosInstance from './axiosConfig'; | ||
import { PostRetrospectivesRequest, PostRetrospectivesResponse } from '@/api/@types/Retrospectives'; | ||
|
||
// post 요청 | ||
const createRetrospective = async (requestData: PostRetrospectivesRequest): Promise<PostRetrospectivesResponse> => { | ||
try { | ||
const response = await axiosInstance.post<PostRetrospectivesResponse>('/api/retrospectives', requestData); | ||
console.log('회고 생성 성공', response.data); | ||
return response.data; | ||
} catch (error) { | ||
throw new Error('회고 생성 실패'); | ||
} | ||
}; | ||
|
||
export default createRetrospective; |
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import React from 'react'; | ||
import { Select } from '@chakra-ui/react'; | ||
|
||
const TemlplateSelect: React.FC = () => { | ||
const TemplateSelect: React.FC<{ onChange: (templateId: number) => void }> = ({ onChange }) => { | ||
return ( | ||
<> | ||
<div>Template</div> | ||
<Select placeholder="Select option"> | ||
<option value="KUDOS">KUDOS ver</option> | ||
<option value="KPT">KPT ver</option> | ||
<Select placeholder="Select option" onChange={e => onChange(Number(e.target.value))}> | ||
<option value="1">KUDOS ver</option> | ||
<option value="2">KPT ver</option> | ||
</Select> | ||
</> | ||
); | ||
}; | ||
|
||
export default TemlplateSelect; | ||
export default TemplateSelect; |
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