import React, {useState, useCallback} from 'react'; import {Link, useParams} from 'react-router-dom'; import * as EgovNet from 'api/egovFetch'; import DownloadModal from './DownloadModal' import StandardCodeSearchForm from "./StandardCodeSearchForm"; import Loading from "components/Loading"; import StandardCodeList from "./StandardCodeList"; import URL from "constants/url"; function StandardCodePage({}) { const {listCode} = useParams(); const [listData, setListData] = useState([]) const [listLoading, setListLoading] = useState(true); const [filterData, setFilterData] = useState(''); const [resultCnt, setResultCnt] = useState(0); const [remarkCnt, setRemarkCnt] = useState(0); const [show, setShow] = useState(false); function close() { setShow(false); } const retrieveList = useCallback((searchCondition) => { setListLoading(true) EgovNet.requestFetch('/standardCode/standard-code-list'+EgovNet.convParams(searchCondition), { method: "GET", headers: { 'Content-type': 'application/json', } }, (resp) => { setListData(resp.result.resultList); setResultCnt(resp.result.resultCnt.allCnt); setRemarkCnt(resp.result.resultCnt.remarkCnt); setListLoading(false) }, function (resp) { console.log("err response : ", resp); } ); }, []); function downloadModal(){ setShow(true); } return (