1:1 qno=>qna ,qnaNo,siteTpCd #131

Merged
ysCha merged 1 commits from dev_cha into dev 2025-11-25 15:33:43 +09:00
2 changed files with 6 additions and 5 deletions
Showing only changes of commit 79a2df2340 - Show all commits

View File

@ -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(() =>

View File

@ -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,
})
/**