import { Outlet, useNavigate } from 'react-router-dom'; import React, { useState, useEffect, useRef } from 'react'; import { useSearchParams } from 'react-router-dom'; const zncmUrl = import.meta.env.VITE_AIPI_CONSUMER_URL || ''; import { requestCrudService } from '@/service/request-axios-service'; const service = requestCrudService; const userInfo = localStorage.getItem('userInfo'); const deerFlowUrl = 'https://ch1.b.uat.4.cn/xwtweb/#/login/'; interface TaskPgFromProps { gopath: string } const GAFromNewQA: React.FC = ({gopath}) => { const [deerFlow, setDeerFlow] = useState('https://ch1.b.uat.4.cn/xwtweb/#/login/'); // http://localhost:5174/#/ useEffect(() => { if(userInfo) { const userName = JSON.parse(userInfo).userName; const gaUrl = deerFlowUrl + userName + `?pathTo=${gopath}` console.log('gaUrl', gaUrl) setDeerFlow(gaUrl); } }, [gopath]); return (
); } export default GAFromNewQA