import React, {useCallback, useEffect, useState} from 'react'; import {Link} from "react-router-dom"; import URL from "constants/url"; import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin'; import EgovPaging from "components/EgovPaging"; import * as EgovNet from "api/egovFetch"; import Modal from "react-bootstrap/Modal"; import UserInfoModal from "./UserInfoModal"; import CODE from "../../../constants/code"; function List({}) { const [searchCondition, setSearchCondition] = useState({ pageIndex: 1, userSe: '', searchCondition: 'id', searchKeyword: '' }); const [listTag, setListTag] = useState([]); const [paginationInfo, setPaginationInfo] = useState({}); const [show, setShow] = useState(false); const [modalBody, setModalBody] = useState(); const handleClose = () => setShow(false); const handleShow = () => setShow(true); const retrieveList = useCallback((searchCondition) => { const params = EgovNet.convParams(searchCondition); EgovNet.requestFetch( '/admin/users/mgt/list'+params, { method: "GET" }, (resp) => { setPaginationInfo(resp.result.paginationInfo); let mutListTag = []; setListTag([]); // 리스트 항목 구성 const cmtList = resp.result.cmtList; resp.result.userList.forEach(function (item, index) { mutListTag.push(
검색된 결과가 없습니다.
); // 게시판 목록 초기값 setListTag(mutListTag); }, function (resp) { console.log("err response : ", resp); } ); },[]); useEffect(() => { retrieveList(searchCondition); }, [searchCondition.pageIndex]); const movePage = useCallback((passedPage) => { setSearchCondition({...searchCondition, pageIndex: passedPage}) }); function userInfoModal(userInfo, cmtList){ handleShow() setModalBody(