diff --git a/openmetadata-ui/src/main/resources/ui/src/App.tsx b/openmetadata-ui/src/main/resources/ui/src/App.tsx index a511d1c40041..cbcc1eaef496 100644 --- a/openmetadata-ui/src/main/resources/ui/src/App.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/App.tsx @@ -30,7 +30,6 @@ import PermissionProvider from './context/PermissionProvider/PermissionProvider' import TourProvider from './context/TourProvider/TourProvider'; import WebSocketProvider from './context/WebSocketProvider/WebSocketProvider'; import { useApplicationStore } from './hooks/useApplicationStore'; -import { useWelcomeStore } from './hooks/useWelcomeStore'; import { getCustomUiThemePreference } from './rest/settingConfigAPI'; import { history } from './utils/HistoryUtils'; import i18n from './utils/i18next/LocalUtil'; @@ -38,7 +37,6 @@ import { getThemeConfig } from './utils/ThemeUtils'; const App: FC = () => { const { applicationConfig, setApplicationConfig } = useApplicationStore(); - const { setIsWelcomeVisible } = useWelcomeStore(); const fetchApplicationConfig = async () => { try { @@ -56,7 +54,6 @@ const App: FC = () => { useEffect(() => { fetchApplicationConfig(); - setIsWelcomeVisible(true); }, []); useEffect(() => { diff --git a/openmetadata-ui/src/main/resources/ui/src/hooks/useWelcomeStore.ts b/openmetadata-ui/src/main/resources/ui/src/hooks/useWelcomeStore.ts index e2d0ffca19fb..fdca6e21bb70 100644 --- a/openmetadata-ui/src/main/resources/ui/src/hooks/useWelcomeStore.ts +++ b/openmetadata-ui/src/main/resources/ui/src/hooks/useWelcomeStore.ts @@ -18,7 +18,7 @@ interface WelcomeStore { } export const useWelcomeStore = create()((set) => ({ - isWelcomeVisible: false, + isWelcomeVisible: true, setIsWelcomeVisible: (isVisible: boolean) => { set({ isWelcomeVisible: isVisible }); }, diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/MyDataPage/MyDataPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/MyDataPage/MyDataPage.component.tsx index b85dd6cbd2f8..af1078adf031 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/MyDataPage/MyDataPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/MyDataPage/MyDataPage.component.tsx @@ -115,7 +115,7 @@ const MyDataPage = () => { updateWelcomeScreen(!usernameExistsInCookie && isWelcomeVisible); return () => updateWelcomeScreen(false); - }, []); + }, [isWelcomeVisible]); const fetchUserFollowedData = async () => { if (!currentUser?.id) { @@ -196,6 +196,10 @@ const MyDataPage = () => { // call the hook to set the direction of the grid layout useGridLayoutDirection(isLoading); + if (isLoading || applicationsLoading) { + return ; + } + if (showWelcomeScreen) { return (
@@ -209,29 +213,21 @@ const MyDataPage = () => { - {isLoading || applicationsLoading ? ( -
- -
- ) : ( - <> - - {widgets} - - -
-
- - )} + + {widgets} + + +
+
);