diff --git a/src/components/main/MainContents.jsx b/src/components/main/MainContents.jsx index f20bfaf7..52117630 100644 --- a/src/components/main/MainContents.jsx +++ b/src/components/main/MainContents.jsx @@ -80,14 +80,14 @@ export default function MainContents({ setFaqOpen, setFaqModalNoticeNo }) { //공지사항 호출 const fetchNoticeList = async () => { + const param = { + schNoticeTpCd: 'QC', + schNoticeClsCd: 'NOTICE', + startRow: 1, + endRow: 1, + } + const noticeApiUrl = `api/board/list?${queryStringFormatter(param)}` try { - const param = { - schNoticeTpCd: 'QC', - schNoticeClsCd: 'NOTICE', - startRow: 1, - endRow: 1, - } - const noticeApiUrl = `api/board/list?${queryStringFormatter(param)}` await promiseGet({ url: noticeApiUrl }).then((res) => { if (res.status === 200) { setRecentNoticeList(res.data.data) @@ -111,14 +111,14 @@ export default function MainContents({ setFaqOpen, setFaqModalNoticeNo }) { //FAQ 호출 const fetchFaqList = async () => { + const param = { + schNoticeTpCd: 'QC', + schNoticeClsCd: 'FAQ', + startRow: 1, + endRow: 3, + } + const faqApiUrl = `api/board/list?${queryStringFormatter(param)}` try { - const param = { - schNoticeTpCd: 'QC', - schNoticeClsCd: 'FAQ', - startRow: 1, - endRow: 3, - } - const faqApiUrl = `api/board/list?${queryStringFormatter(param)}` await promiseGet({ url: faqApiUrl, }).then((res) => {