Skip to content

Commit 8f32e4d

Browse files
Merge pull request #9572 from JayaShakthi97/patch-rotation
[bug-fix][myaccount] Fix flash of disabled features during app initialization
2 parents ac342a5 + b33fba4 commit 8f32e4d

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@wso2is/myaccount": patch
3+
---
4+
5+
Fix flash of disabled features during app initialization

apps/myaccount/src/layouts/dashboard.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2022-2025, WSO2 LLC. (https://www.wso2.com).
2+
* Copyright (c) 2022-2026, WSO2 LLC. (https://www.wso2.com).
33
*
44
* WSO2 LLC. licenses this file to you under the Apache License,
55
* Version 2.0 (the "License"); you may not use this file except
@@ -109,12 +109,10 @@ export const DashboardLayout: FunctionComponent<PropsWithChildren<DashboardLayou
109109
const config: ConfigReducerStateInterface = useSelector((state: AppState) => state.config);
110110
const isApplicationsPageVisible: boolean = useSelector((state: AppState) => state.global.isApplicationsPageVisible);
111111

112-
const [ selectedRoute, setSelectedRoute ] = useState<RouteInterface | ChildRouteInterface>(
113-
getDashboardLayoutRoutes()[ 0 ]
114-
);
112+
const [ selectedRoute, setSelectedRoute ] = useState<RouteInterface | ChildRouteInterface | null>(null);
115113
const [ announcement, setAnnouncement ] = useState<AnnouncementBannerInterface>();
116114
const [ showAnnouncement, setShowAnnouncement ] = useState<boolean>(true);
117-
const [ dashboardLayoutRoutes, setDashboardLayoutRoutes ] = useState<RouteInterface[]>(getDashboardLayoutRoutes());
115+
const [ dashboardLayoutRoutes, setDashboardLayoutRoutes ] = useState<RouteInterface[]>([]);
118116
const allowedScopes: string = useSelector((state: AppState) => state?.authenticationInformation?.scope);
119117
const profileDetails: AuthStateInterface = useSelector((state: AppState) => state.authenticationInformation);
120118

0 commit comments

Comments
 (0)