로딩화면 조건 변경.

cks
강석 최 2023-10-25 13:05:11 +09:00
parent bf559cc5f9
commit 76b10125d0
1 changed files with 5 additions and 3 deletions

View File

@ -10,7 +10,8 @@ import Modal from 'react-bootstrap/Modal';
import * as EgovNet from 'api/egovFetch';
function CodeViewer(props) {
const [loading, setLoading] = useState(true);
const [treeLoading, setTreeLoading] = useState(true);
const [docLoading, setDocLoading] = useState(true);
const {linkedDocCode} = useParams();
const [docCode, setDocCode] = useState(linkedDocCode !== undefined?linkedDocCode:props.docCode);
const [docName, setDocName] = useState(props.docName);
@ -68,7 +69,7 @@ function CodeViewer(props) {
treeTag.push(<div>검색된 결과가 없습니다.</div>); // 코드 목록 초기값
}
setCodeTree(treeTag);
setLoading(false);
setTreeLoading(false);
},
function (resp) {
console.log("err response : ", resp);
@ -151,6 +152,7 @@ function CodeViewer(props) {
}
setDocSummary(summaryTag);
setDocDetail(detailTag);
setDocLoading(false);
},
function (resp) {
console.log("err response : ", resp);
@ -184,7 +186,7 @@ function CodeViewer(props) {
console.groupEnd("viewer");
return (
<>
{loading? (<Loading/>):(
{treeLoading && docLoading? (<Loading/>):(
<Row className="mx-0">
<Col xs={12} className="border-bottom">
<Row>