fix tour page not showing (#13902)

This commit is contained in:
Ashish Gupta 2023-11-09 10:22:09 +05:30 committed by GitHub
parent 2adce103f4
commit ef2a27a217
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 264 additions and 260 deletions

View File

@ -69,7 +69,10 @@ const ActivityFeedListV1 = ({
} }
return isEmpty(entityThread) ? ( return isEmpty(entityThread) ? (
<div className="h-full p-x-md" data-testid="no-data-placeholder-container"> <div
className="h-full p-x-md"
data-testid="no-data-placeholder-container"
id="feedData">
<ErrorPlaceHolder <ErrorPlaceHolder
icon={ icon={
isTaskTab ? ( isTaskTab ? (

View File

@ -12,7 +12,7 @@
*/ */
import { observer } from 'mobx-react'; import { observer } from 'mobx-react';
import React, { useEffect } from 'react'; import React, { useEffect, useMemo } from 'react';
import Tour from '../../components/tour/Tour'; import Tour from '../../components/tour/Tour';
import { useTourProvider } from '../../components/TourProvider/TourProvider'; import { useTourProvider } from '../../components/TourProvider/TourProvider';
import { TOUR_SEARCH_TERM } from '../../constants/constants'; import { TOUR_SEARCH_TERM } from '../../constants/constants';
@ -39,8 +39,8 @@ const TourPage = () => {
updateIsTourOpen(true); updateIsTourOpen(true);
}, []); }, []);
const getCurrentPage = (page: CurrentTourPageType) => { const currentPageComponent = useMemo(() => {
switch (page) { switch (currentTourPage) {
case CurrentTourPageType.MY_DATA_PAGE: case CurrentTourPageType.MY_DATA_PAGE:
return <MyDataPageV1 />; return <MyDataPageV1 />;
@ -53,7 +53,7 @@ const TourPage = () => {
default: default:
return; return;
} }
}; }, [currentTourPage]);
return ( return (
<> <>
@ -65,7 +65,7 @@ const TourPage = () => {
updateTourPage, updateTourPage,
})} })}
/> />
{getCurrentPage(currentTourPage)} {currentPageComponent}
</> </>
); );
}; };

View File

@ -24,10 +24,12 @@ interface ArgObject {
clearSearchTerm: () => void; clearSearchTerm: () => void;
} }
export const getTourSteps = (args: ArgObject) => { export const getTourSteps = ({
const { searchTerm, clearSearchTerm, updateActiveTab, updateTourPage } = args; searchTerm,
clearSearchTerm,
return [ updateActiveTab,
updateTourPage,
}: ArgObject) => [
{ {
content: () => ( content: () => (
<p> <p>
@ -287,4 +289,3 @@ export const getTourSteps = (args: ArgObject) => {
selector: '#lineageDetails', selector: '#lineageDetails',
}, },
]; ];
};