Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

[Fix] Dev portal On-boarding issue (#800)

jagadeeswaran-zipstack3ac8b04b127f
diff --git a/frontend/src/components/helpers/auth/PersistentLogin.js b/frontend/src/components/helpers/auth/PersistentLogin.js
index 1ed1051d8..27508d3f1 100644
--- a/frontend/src/components/helpers/auth/PersistentLogin.js
+++ b/frontend/src/components/helpers/auth/PersistentLogin.js
@@ -7,11 +7,28 @@ import { SocketMessages } from "../socket-messages/SocketMessages";
import { GenericLoader } from "../../generic-loader/GenericLoader";
import { PromptRun } from "../../custom-tools/prompt-card/PromptRun";
+let selectedProductStore;
+let selectedProduct;
+try {
+ selectedProductStore = require("../../../plugins/llm-whisperer/store/select-product-store.js");
+} catch {
+ // Ignore if hook not available
+}
+
function PersistentLogin() {
const [isLoading, setIsLoading] = useState(true);
const { sessionDetails } = useSessionStore();
const checkSessionValidity = useSessionValid();
+ try {
+ if (selectedProductStore?.useSelectedProductStore) {
+ selectedProduct = selectedProductStore?.useSelectedProductStore(
+ (state) => state?.selectedProduct
+ );
+ }
+ } catch (error) {
+ // Do nothing
+ }
useEffect(() => {
let isMounted = true;
@@ -23,10 +40,15 @@ function PersistentLogin() {
}
};
- !sessionDetails?.isLoggedIn ? verifySession() : setIsLoading(false);
+ if (!sessionDetails?.isLoggedIn) {
+ setIsLoading(true); // Only trigger loading if session is invalid
+ verifySession();
+ } else {
+ setIsLoading(false);
+ }
return () => (isMounted = false);
- }, []);
+ }, [selectedProduct]);
if (isLoading) {
return <GenericLoader />;
diff --git a/frontend/src/components/navigations/top-nav-bar/TopNavBar.jsx b/frontend/src/components/navigations/top-nav-bar/TopNavBar.jsx
index f82089c17..3e2012fd4 100644
--- a/frontend/src/components/navigations/top-nav-bar/TopNavBar.jsx
+++ b/frontend/src/components/navigations/top-nav-bar/TopNavBar.jsx
@@ -175,7 +175,7 @@ function TopNavBar({ isSimpleLayout }) {
// Profile Dropdown items
const items = [
- {
+ isUnstract && {
key: "1",
label: (
<Button