From 4114a3ca1ef67b9bd370b88fe835eb15d97e56e2 Mon Sep 17 00:00:00 2001 From: basssy Date: Mon, 9 Dec 2024 09:23:37 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AC=BC=EA=B1=B4=20=EC=83=81=EC=84=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Main.jsx | 29 ++-------------------------- src/components/main/MainContents.jsx | 29 ---------------------------- src/components/management/Stuff.jsx | 4 +--- 3 files changed, 3 insertions(+), 59 deletions(-) diff --git a/src/components/Main.jsx b/src/components/Main.jsx index e3c491e3..cb51b352 100644 --- a/src/components/Main.jsx +++ b/src/components/Main.jsx @@ -27,37 +27,12 @@ export default function MainPage() { const [searchRadioType, setSearchRadioType] = useState('object') - // const [saleStoreId, setSaleStoreId] = useState('') - // const [saleStoreName, setSaleStoreName] = useState('') - const [stuffSearch, setStuffSearch] = useRecoilState(stuffSearchState) const [searchForm, setSearchForm] = useRecoilState(searchState) const { qcastState } = useContext(QcastContext) - // useEffect(() => { - // if (session.pwdInitYn === 'Y') { - // fetchObjectList() - // } - // }, [session]) - - const fetchObjectList = async () => { - try { - const apiUrl = `/api/main-page/object/${session?.storeId}/list` - await promiseGet({ - url: apiUrl, - }).then((res) => { - if (res.status === 200) { - setSaleStoreId(res.data.saleStoreId) - setSaleStoreName(res.data.saleStoreName) - } - }) - } catch (error) { - console.error('MAIN API fetching error:', error) - } - } - // 엔터 이벤트 const handleByOnKeyUp = (e) => { if (e.key === 'Enter') { @@ -68,7 +43,7 @@ export default function MainPage() { schObjectNo: searchTxt, code: 'M', }) - router.push('/management/stuff') + router.push('/management/stuff', { scroll: false }) } else { setSearchForm({ ...searchForm, searchValue: searchTxt, mainFlag: 'Y' }) router.push('/community/faq') @@ -90,7 +65,7 @@ export default function MainPage() { code: 'M', }) - router.push('/management/stuff') + router.push('/management/stuff', { scroll: false }) } else { setSearchForm({ ...searchForm, searchValue: searchTxt, mainFlag: 'Y' }) router.push('/community/faq') diff --git a/src/components/main/MainContents.jsx b/src/components/main/MainContents.jsx index 3cb668cc..ccae193a 100644 --- a/src/components/main/MainContents.jsx +++ b/src/components/main/MainContents.jsx @@ -22,19 +22,12 @@ export default function MainContents() { const globalLocaleState = useRecoilValue(globalLocaleStore) const { promiseGet } = useAxios(globalLocaleState) - //최근 물건 - // const [objectList, setObjectList] = useState([]) - //공지사항 const [recentNoticeList, setRecentNoticeList] = useState([]) //FAQ const [recentFaqList, setRecentFaqList] = useState([]) - //Sales Contact info - // const [businessCharger, setBusinessCharger] = useState(null) - // const [businessChargerMail, setBusinessChargerMail] = useState(null) - const { qcastState } = useContext(QcastContext) const { fetchObjectList, initObjectList } = useMainContentsController() @@ -47,28 +40,6 @@ export default function MainContents() { } }, []) - //최근 갱신 물건목록 / Sales Contact info 정보 - // const fetchObjectList = async () => { - // try { - // const apiUrl = `/api/main-page/object/${session?.storeId}/list` - // await promiseGet({ - // url: apiUrl, - // }).then((res) => { - // if (res.status === 200) { - // setObjectList(res.data.objectList) - // setBusinessCharger(res.data.businessCharger) - // setBusinessChargerMail(res.data.businessChargerMail) - // } else { - // setObjectList([]) - // setBusinessCharger(null) - // setBusinessChargerMail(null) - // } - // }) - // } catch (error) { - // console.error('MAIN API fetching error:', error) - // } - // } - //공지사항 호출 const fetchNoticeList = async () => { try { diff --git a/src/components/management/Stuff.jsx b/src/components/management/Stuff.jsx index 52b09755..33d7883b 100644 --- a/src/components/management/Stuff.jsx +++ b/src/components/management/Stuff.jsx @@ -211,7 +211,6 @@ export default function Stuff() { fetchData() } else if (stuffSearchParams?.code === 'M') { const params = { - saleStoreId: session?.storeId, schObjectNo: stuffSearchParams.schObjectNo, schAddress: '', schObjectName: '', @@ -225,7 +224,7 @@ export default function Stuff() { endRow: pageNo * pageSize, schSelSaleStoreId: stuffSearchParams?.schOtherSelSaleStoreId ? stuffSearchParams.schOtherSelSaleStoreId : stuffSearchParams.schSelSaleStoreId, schSortType: 'R', - code: 'S', + code: 'E', pageNo: 1, pageSize: 100, } @@ -338,7 +337,6 @@ export default function Stuff() { //최근 등록일 수정일 정렬 이벤트 const onChangeSortType = (e) => { - // let startRow = (stuffSearchParams.pageNo - 1) * pageSize + 1 let startRow = (1 - 1) * stuffSearchParams.pageSize + 1 stuffSearchParams.startRow = startRow stuffSearchParams.endRow = startRow * stuffSearchParams.pageSize