merging
This commit is contained in:
commit
c32f6301ba
|
@ -7,28 +7,24 @@ import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC";
|
||||||
|
|
||||||
const Iframe = (props) => {
|
const Iframe = (props) => {
|
||||||
|
|
||||||
const history = props.history
|
const { history, showLoginDialog, current_user } = props
|
||||||
const location = history.location
|
let settings = localStorage.chromesetting && localStorage.chromesetting !== 'undefined' &&JSON.parse(localStorage.chromesetting);
|
||||||
|
|
||||||
// if (!location.state.url) {
|
useEffect(() => {
|
||||||
// history.push("/404");
|
if (!settings?.common?.hiAgent) {
|
||||||
// }
|
history.push("/404");
|
||||||
|
}
|
||||||
|
if (!current_user?.login) {
|
||||||
|
history.push("/login?go_page=/hiagent");
|
||||||
|
}
|
||||||
|
}, [])
|
||||||
|
|
||||||
function iframeLoad() {
|
return current_user?.login ? <iframe
|
||||||
let myIframe = document.getElementById("iframe");
|
|
||||||
// if (myIframe.contentWindow.location && myIframe.contentWindow.location.href) {
|
|
||||||
// window.location.href = 'http://118.145.132.196:3000/product/llm/llm-chat'
|
|
||||||
// //myIframe.contentWindow.location.href
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
return <iframe
|
|
||||||
id="iframe"
|
id="iframe"
|
||||||
width="100%"
|
width="100%"
|
||||||
className="test-iframe"
|
className="test-iframe"
|
||||||
src={ 'https://testllm.trustie.net' }
|
src={ settings?.common?.hiAgent }
|
||||||
onLoad={iframeLoad}
|
></iframe> : ''
|
||||||
></iframe>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default withRouter(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Iframe))));
|
export default withRouter(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Iframe))));
|
Loading…
Reference in New Issue