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