-
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.
Merge pull request #76 from Step3-kakao-tech-campus/develop
[9주차] : 개발 사항 Merge(develop → master)
- Loading branch information
Showing
83 changed files
with
1,173 additions
and
494 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { instance } from './index'; | ||
|
||
export const adminAuth = () => { | ||
return instance.put('/admin/auth/approval'); | ||
}; | ||
|
||
export const adminAuthDetail = (id = 1) => { | ||
return instance.get(`/admin/auth/list/${id}`); | ||
}; | ||
|
||
export const adminAuthList = () => { | ||
return instance.get('/admin/auth/list'); | ||
}; |
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,29 @@ | ||
import { instance } from './index'; | ||
|
||
// 마이페이지 조회 (닉네임, 유저등급) | ||
// eslint-disable-next-line import/prefer-default-export | ||
export const getMyPage = () => { | ||
return instance.get('/mypage'); | ||
}; | ||
|
||
// presigned URL 가져오기 | ||
// eslint-disable-next-line import/prefer-default-export | ||
export const getPresignedUrl = () => { | ||
return instance.get('/mypage/image/url'); | ||
}; | ||
|
||
// 유저등급 조회 | ||
// eslint-disable-next-line import/prefer-default-export | ||
export const getUserAuth = () => { | ||
return instance.get('/mypage/auth'); | ||
}; | ||
|
||
// 회원수정 | ||
|
||
// 공고글 목록(작성자) | ||
|
||
// 공고글 상세확인(작성자) | ||
|
||
// 공고글 목록(피커) | ||
|
||
// 공고글 상세확인(피커) |
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,24 @@ | ||
import instance from './index'; | ||
import { instance } from './index'; | ||
|
||
export const postDetail = (boardId = '') => { | ||
return instance.get(`/articles/before/${boardId}`); | ||
// 공고상세페이지 받아오기 (피커, 작성자용) | ||
/* eslint-disable-next-line */ | ||
export const postDetail = (boardId) => { | ||
return instance.get(`/post/${boardId}`); | ||
}; | ||
|
||
export default postDetail; | ||
// 매칭후 공고상세페이지 받아오기(피커정보있음) (작성자용) | ||
/* eslint-disable-next-line */ | ||
export const postDetailWriter = (boardId) => { | ||
return instance.get(`/articles/after/${boardId}`); | ||
}; | ||
|
||
// 매칭하기 (피커용) | ||
/* eslint-disable-next-line */ | ||
export const postDetailPicker = (data) => { | ||
const { arrivalTime, boardId } = data; | ||
return instance.post('/articles/agree', { arrivalTime, boardId }); | ||
}; | ||
|
||
// 공고글 삭제 | ||
|
||
// 공고글 수정 |
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,8 @@ | ||
import { instance } from './index'; | ||
|
||
const registerBank = (userInfo) => { | ||
return instance.post('/users/register/input', userInfo); | ||
console.log('계좌정보 등록 : ', userInfo); | ||
return instance.post('/signup', userInfo); | ||
}; | ||
|
||
export default registerBank; |
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,39 @@ | ||
import axios from 'axios'; | ||
|
||
const imageInstance = axios.create({ | ||
baseURL: process.env.REACT_APP_API_URL, | ||
timeout: 1000, | ||
headers: { | ||
'Content-Type': 'multipart/form-data', | ||
}, | ||
}); | ||
|
||
imageInstance.interceptors.request.use((config) => { | ||
const token = localStorage.getItem('accessToken'); | ||
if (token) { | ||
// eslint-disable-next-line no-param-reassign | ||
config.headers.Authorization = `${token}`; | ||
} | ||
return config; | ||
}); | ||
|
||
imageInstance.interceptors.response.use( | ||
(response) => { | ||
return response; | ||
}, | ||
(error) => { | ||
console.log(error); | ||
return Promise.reject(error.response); | ||
}, | ||
); | ||
|
||
const uploadCard = (imageData) => { | ||
const formData = { | ||
key: 'image', | ||
value: imageData, | ||
}; | ||
console.log(formData); | ||
return imageInstance.post('/mypage/image/url', formData); | ||
}; | ||
|
||
export default uploadCard; |
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,5 +1,8 @@ | ||
const ErrorMsg = () => { | ||
return <p className="text-red-600 text-sm">필수 입력 항목입니다.</p>; | ||
// eslint-disable-next-line | ||
import { ErrorMessage } from '@hookform/error-message'; | ||
|
||
const ErrorMsg = ({ errors, name, as, render }) => { | ||
return <ErrorMessage className="text-red-600 text-sm" errors={errors} name={name} as={as} render={render} />; | ||
}; | ||
|
||
export default ErrorMsg; |
22 changes: 17 additions & 5 deletions
22
src/components/organisms/Info.jsx → src/components/atoms/Info.jsx
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 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,17 @@ | ||
import '../../../styles/thumb.css'; | ||
|
||
const RangeInput = ({ name, register }) => { | ||
return ( | ||
<input | ||
name={name} | ||
{...register} | ||
type="range" | ||
max="2500" | ||
min="1000" | ||
step="500" | ||
className="custom-thumb w-[17rem] bg-gray-200 rounded-lg appearance-none" | ||
/> | ||
); | ||
}; | ||
|
||
export default RangeInput; |
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
File renamed without changes.
File renamed without changes.
Oops, something went wrong.