Skip to content

Commit

Permalink
fix: get all pages list for navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
AmanAgarwal041 committed Aug 8, 2024
1 parent a9bc4e4 commit e8064dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
4 changes: 2 additions & 2 deletions app/client/src/pages/AppViewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as Sentry from "@sentry/react";
import {
getCurrentPageDescription,
getIsAutoLayout,
getViewModePageListWithHiddenPages,
getPageList,
} from "selectors/editorSelectors";
import { getThemeDetails, ThemeMode } from "selectors/themeSelectors";
import { getSearchQuery } from "utils/helpers";
Expand Down Expand Up @@ -88,7 +88,7 @@ function AppViewer(props: Props) {
const { pathname, search } = props.location;
const { baseApplicationId, basePageId } = props.match.params;
const isInitialized = useSelector(getIsInitialized);
const pages = useSelector(getViewModePageListWithHiddenPages);
const pages = useSelector(getPageList);
const selectedTheme = useSelector(getSelectedAppTheme);
const lightTheme = useSelector((state: AppState) =>
getThemeDetails(state, ThemeMode.LIGHT),
Expand Down
19 changes: 0 additions & 19 deletions app/client/src/selectors/editorSelectors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,25 +255,6 @@ export const getViewModePageList = createSelector(
},
);

export const getViewModePageListWithHiddenPages = createSelector(
getPageList,
getCurrentPageId,
(pageList: PageListReduxState["pages"], currentPageId?: string) => {
if (currentPageId) {
const currentPage = pageList.find(
(page) => page.pageId === currentPageId,
);
if (!!currentPage?.isHidden) {
return [currentPage];
}

return pageList;
}

return [];
},
);

const defaultLayout: AppLayoutConfig = {
type: "FLUID",
};
Expand Down

0 comments on commit e8064dc

Please sign in to comment.