-
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.
Merge pull request #166 from YAPP-Github/dev
Release 0.1.6
- Loading branch information
Showing
26 changed files
with
403 additions
and
54 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
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 { getAboardAreaAPI } from '@/lib/api/area'; | ||
import { useEffect, useState } from 'react'; | ||
|
||
function useAboardAreaLoad() { | ||
const [area, setArea] = useState([]); | ||
useEffect(() => { | ||
const getAboardArea = async () => { | ||
const data = await getAboardAreaAPI(); | ||
setArea(data); | ||
}; | ||
getAboardArea(); | ||
}, []); | ||
|
||
return { area }; | ||
} | ||
|
||
export default useAboardAreaLoad; |
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,22 @@ | ||
import { SearchData } from '@/components/domain/survey/SearchSelector'; | ||
import { getUnivAPI } from '@/lib/api/university'; | ||
import { useEffect, useState } from 'react'; | ||
|
||
function useUnivLoad() { | ||
const [univs, setUnivs] = useState<SearchData[]>([]); | ||
useEffect(() => { | ||
const getAllUniv = async () => { | ||
try { | ||
const data = await getUnivAPI(); | ||
setUnivs(data); | ||
} catch (error) { | ||
console.log(error); | ||
} | ||
}; | ||
getAllUniv(); | ||
}, []); | ||
|
||
return { univs }; | ||
} | ||
|
||
export default useUnivLoad; |
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,22 @@ | ||
import apiClient from './index'; | ||
import { AdminUsersStatus } from '@/types/user'; | ||
|
||
export const getMeetingUsers = async () => { | ||
const res = await apiClient.get<AdminUsersStatus[]>('/admin/users/meeting/status'); | ||
return res.data; | ||
}; | ||
|
||
export const getDatingUsers = async () => { | ||
const res = await apiClient.get<AdminUsersStatus[]>('/admin/users/dating/status'); | ||
return res.data; | ||
}; | ||
|
||
export const patchMeetingPayment = async (kakaoId: string) => { | ||
const res = await apiClient.patch<AdminUsersStatus[]>('/admin/users/meeting/payment', { kakaoId }); | ||
return res.data; | ||
}; | ||
|
||
export const patchDatingPayment = async (kakaoId: string) => { | ||
const res = await apiClient.patch<AdminUsersStatus[]>('/admin/users/dating/payment', { kakaoId }); | ||
return res.data; | ||
}; |
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 apiClient from '.'; | ||
|
||
export const getAboardAreaAPI = async () => { | ||
const res = await apiClient.get('/areas'); | ||
console.log(res); | ||
|
||
return res.data; | ||
}; | ||
|
||
export const postAboardAreaAPI = async (body: { id: number; name: string }) => { | ||
const res = await apiClient.post('/areas', body); | ||
return res.data; | ||
}; |
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 apiClient from '.'; | ||
|
||
export const getUnivAPI = async () => { | ||
const res = await apiClient.get('/university'); | ||
return res.data; | ||
}; | ||
|
||
export const postUnivAPI = async (body: { id: number; name: string }) => { | ||
const res = await apiClient.post('/university', body); | ||
return res.data; | ||
}; |
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
Oops, something went wrong.