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