diff --git a/src/components/search-result/search-result.module.scss b/src/components/search-result/search-result.module.scss index 37428c3a6f..18d232d775 100644 --- a/src/components/search-result/search-result.module.scss +++ b/src/components/search-result/search-result.module.scss @@ -44,10 +44,17 @@ } } +.expandableIcon { + font-size: 15px; + margin-right: 5px; + cursor: pointer +} + .redirectIcons { - float: right; - } + float: right; +} .redirectIcons a { padding: 8px; + color: #666; } \ No newline at end of file diff --git a/src/components/search-result/search-result.tsx b/src/components/search-result/search-result.tsx index 18919e8c8e..4ac1cd12df 100644 --- a/src/components/search-result/search-result.tsx +++ b/src/components/search-result/search-result.tsx @@ -106,12 +106,12 @@ const SearchResult: React.FC = (props) => { return (
showTableEntityProperties()}> - +
- + - +
diff --git a/src/pages/Browse.tsx b/src/pages/Browse.tsx index e56a6cd343..a9f5802b8b 100644 --- a/src/pages/Browse.tsx +++ b/src/pages/Browse.tsx @@ -20,6 +20,7 @@ interface Props extends RouteComponentProps { } const Browse: React.FC = ({ location }) => { + const { Content, Sider } = Layout; const componentIsMounted = useRef(true); const { user, handleError } = useContext(AuthContext); diff --git a/src/pages/Detail.tsx b/src/pages/Detail.tsx index a1705a55e2..9e1a3384ef 100644 --- a/src/pages/Detail.tsx +++ b/src/pages/Detail.tsx @@ -16,13 +16,13 @@ interface Props extends RouteComponentProps { } const { Content } = Layout; const Detail: React.FC = ({ history, location }) => { - //console.log(history) + const { user, handleError } = useContext(AuthContext); const uriSplit = location.pathname.replace('/detail/', ''); const pkValue = uriSplit.split('/')[0] === '-' ? '' : decodeURIComponent(uriSplit.split('/')[0]); const uri = decodeURIComponent(uriSplit.split('/')[1]).replace(/ /g, "%2520"); const docUri = uri.replace(/%25/g, "%"); - const [selected, setSelected] = useState('instance'); + const [selected, setSelected] = useState(); const [data, setData] = useState(); const [isLoading, setIsLoading] = useState(false); const [contentType, setContentType] = useState(); @@ -53,7 +53,12 @@ const Detail: React.FC = ({ history, location }) => { setData(xmlParser(decodedXml).Document); setXml(xmlDecoder(decodedXml)); } - + if(location.state.selectedValue === 'instance') { + setSelected('instance') + } + else{ + setSelected('full') + } setIsLoading(false); } @@ -72,6 +77,7 @@ const Detail: React.FC = ({ history, location }) => { }, []); + const handleClick = (event) => { setSelected(event.key); } @@ -99,11 +105,11 @@ const Detail: React.FC = ({ history, location }) => {
{ - isLoading || user.error.type === 'ALERT' ?
+ isLoading || user.error.type === 'ALERT' ?
: - contentType === 'json' ? + contentType === 'json' ? selected === 'instance' ? (data && ) : (data && ) : selected === 'instance' ? (data && ) : (data && )