mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-17 21:46:50 +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 TourProvider from './context/TourProvider/TourProvider';
|
||||||
import WebSocketProvider from './context/WebSocketProvider/WebSocketProvider';
|
import WebSocketProvider from './context/WebSocketProvider/WebSocketProvider';
|
||||||
import { useApplicationStore } from './hooks/useApplicationStore';
|
import { useApplicationStore } from './hooks/useApplicationStore';
|
||||||
import { useWelcomeStore } from './hooks/useWelcomeStore';
|
|
||||||
import { getCustomUiThemePreference } from './rest/settingConfigAPI';
|
import { getCustomUiThemePreference } from './rest/settingConfigAPI';
|
||||||
import { history } from './utils/HistoryUtils';
|
import { history } from './utils/HistoryUtils';
|
||||||
import i18n from './utils/i18next/LocalUtil';
|
import i18n from './utils/i18next/LocalUtil';
|
||||||
@ -38,7 +37,6 @@ import { getThemeConfig } from './utils/ThemeUtils';
|
|||||||
|
|
||||||
const App: FC = () => {
|
const App: FC = () => {
|
||||||
const { applicationConfig, setApplicationConfig } = useApplicationStore();
|
const { applicationConfig, setApplicationConfig } = useApplicationStore();
|
||||||
const { setIsWelcomeVisible } = useWelcomeStore();
|
|
||||||
|
|
||||||
const fetchApplicationConfig = async () => {
|
const fetchApplicationConfig = async () => {
|
||||||
try {
|
try {
|
||||||
@ -56,7 +54,6 @@ const App: FC = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetchApplicationConfig();
|
fetchApplicationConfig();
|
||||||
setIsWelcomeVisible(true);
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -18,7 +18,7 @@ interface WelcomeStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const useWelcomeStore = create<WelcomeStore>()((set) => ({
|
export const useWelcomeStore = create<WelcomeStore>()((set) => ({
|
||||||
isWelcomeVisible: false,
|
isWelcomeVisible: true,
|
||||||
setIsWelcomeVisible: (isVisible: boolean) => {
|
setIsWelcomeVisible: (isVisible: boolean) => {
|
||||||
set({ isWelcomeVisible: isVisible });
|
set({ isWelcomeVisible: isVisible });
|
||||||
},
|
},
|
||||||
|
@ -115,7 +115,7 @@ const MyDataPage = () => {
|
|||||||
updateWelcomeScreen(!usernameExistsInCookie && isWelcomeVisible);
|
updateWelcomeScreen(!usernameExistsInCookie && isWelcomeVisible);
|
||||||
|
|
||||||
return () => updateWelcomeScreen(false);
|
return () => updateWelcomeScreen(false);
|
||||||
}, []);
|
}, [isWelcomeVisible]);
|
||||||
|
|
||||||
const fetchUserFollowedData = async () => {
|
const fetchUserFollowedData = async () => {
|
||||||
if (!currentUser?.id) {
|
if (!currentUser?.id) {
|
||||||
@ -196,6 +196,10 @@ const MyDataPage = () => {
|
|||||||
// call the hook to set the direction of the grid layout
|
// call the hook to set the direction of the grid layout
|
||||||
useGridLayoutDirection(isLoading);
|
useGridLayoutDirection(isLoading);
|
||||||
|
|
||||||
|
if (isLoading || applicationsLoading) {
|
||||||
|
return <Loader fullScreen />;
|
||||||
|
}
|
||||||
|
|
||||||
if (showWelcomeScreen) {
|
if (showWelcomeScreen) {
|
||||||
return (
|
return (
|
||||||
<div className="bg-white full-height">
|
<div className="bg-white full-height">
|
||||||
@ -209,29 +213,21 @@ const MyDataPage = () => {
|
|||||||
<PageLayoutV1
|
<PageLayoutV1
|
||||||
mainContainerClassName="p-t-0"
|
mainContainerClassName="p-t-0"
|
||||||
pageTitle={t('label.my-data')}>
|
pageTitle={t('label.my-data')}>
|
||||||
{isLoading || applicationsLoading ? (
|
<ReactGridLayout
|
||||||
<div className="ant-layout-content flex-center">
|
className="bg-white"
|
||||||
<Loader />
|
cols={4}
|
||||||
</div>
|
isDraggable={false}
|
||||||
) : (
|
isResizable={false}
|
||||||
<>
|
margin={[
|
||||||
<ReactGridLayout
|
customizePageClassBase.landingPageWidgetMargin,
|
||||||
className="bg-white"
|
customizePageClassBase.landingPageWidgetMargin,
|
||||||
cols={4}
|
]}
|
||||||
isDraggable={false}
|
rowHeight={100}>
|
||||||
isResizable={false}
|
{widgets}
|
||||||
margin={[
|
</ReactGridLayout>
|
||||||
customizePageClassBase.landingPageWidgetMargin,
|
<LimitWrapper resource="dataAssets">
|
||||||
customizePageClassBase.landingPageWidgetMargin,
|
<br />
|
||||||
]}
|
</LimitWrapper>
|
||||||
rowHeight={100}>
|
|
||||||
{widgets}
|
|
||||||
</ReactGridLayout>
|
|
||||||
<LimitWrapper resource="dataAssets">
|
|
||||||
<br />
|
|
||||||
</LimitWrapper>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</PageLayoutV1>
|
</PageLayoutV1>
|
||||||
</ActivityFeedProvider>
|
</ActivityFeedProvider>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user