1:1 qno=>qna ,qnaNo,siteTpCd
This commit is contained in:
parent
5d32723c9f
commit
79a2df2340
@ -61,8 +61,9 @@ async function getQnaDetail(request: Request): Promise<NextResponse> {
|
|||||||
const { searchParams } = new URL(request.url)
|
const { searchParams } = new URL(request.url)
|
||||||
const params = {
|
const params = {
|
||||||
compCd: searchParams.get('compCd'),
|
compCd: searchParams.get('compCd'),
|
||||||
qnaNo: searchParams.get('qnoNo'),
|
qnaNo: searchParams.get('qnaNo'),
|
||||||
langCd: searchParams.get('langCd'),
|
langCd: searchParams.get('langCd'),
|
||||||
|
siteTpCd: searchParams.get('siteTpCd'),
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await service.tryFunction(() =>
|
const result = await service.tryFunction(() =>
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import { CommCode } from '@/types/CommCode'
|
|||||||
* @returns {CommCode[]} commonCodeList - 공통 코드 목록
|
* @returns {CommCode[]} commonCodeList - 공통 코드 목록
|
||||||
*/
|
*/
|
||||||
export function useInquiry(
|
export function useInquiry(
|
||||||
qnoNo?: number,
|
qnaNo?: number,
|
||||||
isList?: boolean,
|
isList?: boolean,
|
||||||
): {
|
): {
|
||||||
inquiryList: InquiryList[]
|
inquiryList: InquiryList[]
|
||||||
@ -147,7 +147,7 @@ export function useInquiry(
|
|||||||
* @returns {boolean} isLoading - 문의사항 상세 정보 로딩 상태
|
* @returns {boolean} isLoading - 문의사항 상세 정보 로딩 상태
|
||||||
*/
|
*/
|
||||||
const { data: inquiryDetail, isLoading: isLoadingInquiryDetail } = useQuery({
|
const { data: inquiryDetail, isLoading: isLoadingInquiryDetail } = useQuery({
|
||||||
queryKey: ['inquiryDetail', qnoNo],
|
queryKey: ['inquiryDetail', qnaNo],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const isListQuery = false
|
const isListQuery = false
|
||||||
const shouldThrowError = false
|
const shouldThrowError = false
|
||||||
@ -155,14 +155,14 @@ export function useInquiry(
|
|||||||
const resp = await tryFunction(
|
const resp = await tryFunction(
|
||||||
() =>
|
() =>
|
||||||
axiosInstance(null).get<{ data: Inquiry }>(`/api/qna/detail`, {
|
axiosInstance(null).get<{ data: Inquiry }>(`/api/qna/detail`, {
|
||||||
params: { qnoNo, compCd: '5200', langCd: 'JA' },
|
params: { qnaNo, compCd: '5200', langCd: 'JA', siteTpCd: 'QR', loginId:inquiryListRequest.loginId },
|
||||||
}),
|
}),
|
||||||
isListQuery,
|
isListQuery,
|
||||||
shouldThrowError,
|
shouldThrowError,
|
||||||
)
|
)
|
||||||
return resp?.data ?? null
|
return resp?.data ?? null
|
||||||
},
|
},
|
||||||
enabled: qnoNo !== undefined,
|
enabled: qnaNo !== undefined,
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user