로딩화면 조건 변경.
parent
bf559cc5f9
commit
76b10125d0
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue