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