Fix(2753): Replace React Router Navigate with window.location for SSO state refresh ()

* fix(2753): update SSO redirect to use window.location.replace

* fix(2753): remove unused import

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
This commit is contained in:
Andy Santana 2024-12-12 17:33:30 -04:00 committed by GitHub
parent a46eb2418a
commit 0f52afdb9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,5 @@
import React, { useEffect, useState } from "react";
import { FullScreenLoader } from "@/components/Preloader";
import { Navigate } from "react-router-dom";
import paths from "@/utils/paths";
import useQuery from "@/hooks/useQuery";
import System from "@/models/system";
@ -47,7 +46,7 @@ export default function SimpleSSOPassthrough() {
</p>
</div>
);
if (ready) return <Navigate to={redirectPath} />;
if (ready) return window.location.replace(redirectPath);
// Loading state by default
return <FullScreenLoader />;