Skip to content

Commit

Permalink
fix: page transition in multi trial page (#5198)
Browse files Browse the repository at this point in the history
(cherry picked from commit 37fe428)
  • Loading branch information
keita-determined authored and dzhu committed Oct 6, 2022
1 parent 62b9fab commit 4535049
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webui/react/src/pages/TrialDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const TrialDetailsComp: React.FC = () => {
const navigate = useNavigate();
const { experimentId, tab, trialId: trialID } = useParams<Params>();
const [tabKey, setTabKey] = useState<TabType>(tab ?? DEFAULT_TAB_KEY);
const [trialId, setTrialId] = useState<number>(parseInt(trialID ?? ''));
const [trialId, setTrialId] = useState<number>(Number(trialID));
const [trialDetails, setTrialDetails] = useState<ApiState<TrialDetails>>({
data: undefined,
error: undefined,
Expand Down Expand Up @@ -119,8 +119,8 @@ const TrialDetailsComp: React.FC = () => {
const { stopPolling } = usePolling(fetchTrialDetails, { rerunOnNewFn: true });

useEffect(() => {
setTrialId(trialId);
}, [trialId]);
setTrialId(Number(trialID));
}, [trialID]);

useEffect(() => {
fetchTrialDetails();
Expand Down

0 comments on commit 4535049

Please sign in to comment.