mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-17 13:36:56 +00:00
Update welcome page condition (#19308)
* update welcome page condition * update Welcome page consition * fix conditions --------- Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> (cherry picked from commit 63090da961c89b5314a8270262aa8d3faf4c7eb9)
This commit is contained in:
parent
dd4b29c10c
commit
6fd13d940c
@ -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(() => {
|
||||
|
@ -18,7 +18,7 @@ interface WelcomeStore {
|
||||
}
|
||||
|
||||
export const useWelcomeStore = create<WelcomeStore>()((set) => ({
|
||||
isWelcomeVisible: false,
|
||||
isWelcomeVisible: true,
|
||||
setIsWelcomeVisible: (isVisible: boolean) => {
|
||||
set({ isWelcomeVisible: isVisible });
|
||||
},
|
||||
|
@ -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 <Loader fullScreen />;
|
||||
}
|
||||
|
||||
if (showWelcomeScreen) {
|
||||
return (
|
||||
<div className="bg-white full-height">
|
||||
@ -209,12 +213,6 @@ const MyDataPage = () => {
|
||||
<PageLayoutV1
|
||||
mainContainerClassName="p-t-0"
|
||||
pageTitle={t('label.my-data')}>
|
||||
{isLoading || applicationsLoading ? (
|
||||
<div className="ant-layout-content flex-center">
|
||||
<Loader />
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
<ReactGridLayout
|
||||
className="bg-white"
|
||||
cols={4}
|
||||
@ -230,8 +228,6 @@ const MyDataPage = () => {
|
||||
<LimitWrapper resource="dataAssets">
|
||||
<br />
|
||||
</LimitWrapper>
|
||||
</>
|
||||
)}
|
||||
</PageLayoutV1>
|
||||
</ActivityFeedProvider>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user