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) ? (
<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
icon={
isTaskTab ? (

View File

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

View File

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