From 74f06c57d8510e684b2e143ef8c6012db4a91e33 Mon Sep 17 00:00:00 2001 From: shuhaib-aot Date: Tue, 14 Jan 2025 16:35:38 +0530 Subject: [PATCH] Fixed: logout button issue --- forms-flow-admin/src/index.tsx | 6 ++++++ forms-flow-nav/src/sidenav/Sidebar.jsx | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/forms-flow-admin/src/index.tsx b/forms-flow-admin/src/index.tsx index 9bc65fce2..e30f188e4 100644 --- a/forms-flow-admin/src/index.tsx +++ b/forms-flow-admin/src/index.tsx @@ -62,6 +62,12 @@ const Admin = React.memo(({ props }: any) => { } }, []); + React.useEffect(()=>{ + if(instance){ + publish("FF_AUTH", instance); + } + },[instance]) + React.useEffect(()=>{ if(!isAuth) return const locale = localStorage.getItem("i18nextLng") diff --git a/forms-flow-nav/src/sidenav/Sidebar.jsx b/forms-flow-nav/src/sidenav/Sidebar.jsx index bb4d87cf7..0e2544c81 100644 --- a/forms-flow-nav/src/sidenav/Sidebar.jsx +++ b/forms-flow-nav/src/sidenav/Sidebar.jsx @@ -402,8 +402,8 @@ const Sidebar = React.memo(({ props, sidenavHeight="100%" }) => { }); Sidebar.propTypes = { - subscribe: PropTypes.func.isRequired, - getKcInstance: PropTypes.func.isRequired, + subscribe: PropTypes.func, + getKcInstance: PropTypes.func, publish: PropTypes.func, sidenavHeight: PropTypes.string, };