fix: Revert "fix the gitSync related issue" (#36658)

This commit is contained in:
Rishabh Rathod 2024-10-03 06:32:50 +05:30 committed by GitHub
parent 25e83f6603
commit b582098406
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 12 additions and 32 deletions

View File

@ -73,7 +73,7 @@ export interface FetchPublishedPageActionPayload {
export interface FetchPublishedPageResourcesPayload { export interface FetchPublishedPageResourcesPayload {
pageId: string; pageId: string;
basePageId: string; applicationId: string;
} }
export const fetchPublishedPageAction = ( export const fetchPublishedPageAction = (
@ -297,14 +297,14 @@ export const clonePageSuccess = ({
// Fetches resources required for published page, currently only used for fetching actions // Fetches resources required for published page, currently only used for fetching actions
// In future we can reuse this for fetching other page level resources in published mode // In future we can reuse this for fetching other page level resources in published mode
export const fetchPublishedPageResources = ({ export const fetchPublishedPageResourcesAction = (
basePageId, pageId: string,
pageId, applicationId: string,
}: FetchPublishedPageResourcesPayload): ReduxAction<FetchPublishedPageResourcesPayload> => ({ ): ReduxAction<FetchPublishedPageResourcesPayload> => ({
type: ReduxActionTypes.FETCH_PUBLISHED_PAGE_RESOURCES_INIT, type: ReduxActionTypes.FETCH_PUBLISHED_PAGE_RESOURCES_INIT,
payload: { payload: {
pageId, pageId,
basePageId, applicationId,
}, },
}); });

View File

@ -981,8 +981,6 @@ const AppViewActionTypes = {
SET_APP_VIEWER_HEADER_HEIGHT: "SET_APP_VIEWER_HEADER_HEIGHT", SET_APP_VIEWER_HEADER_HEIGHT: "SET_APP_VIEWER_HEADER_HEIGHT",
SET_APP_SIDEBAR_PINNED: "SET_APP_SIDEBAR_PINNED", SET_APP_SIDEBAR_PINNED: "SET_APP_SIDEBAR_PINNED",
FETCH_PUBLISHED_PAGE_RESOURCES_INIT: "FETCH_PUBLISHED_PAGE_RESOURCES_INIT", FETCH_PUBLISHED_PAGE_RESOURCES_INIT: "FETCH_PUBLISHED_PAGE_RESOURCES_INIT",
FETCH_PUBLISHED_PAGE_RESOURCES_SUCCESS:
"FETCH_PUBLISHED_PAGE_RESOURCES_SUCCESS",
}; };
const AppViewActionErrorTypes = { const AppViewActionErrorTypes = {

View File

@ -395,9 +395,9 @@ export function* fetchPublishedPageResourcesSaga(
action: ReduxAction<FetchPublishedPageResourcesPayload>, action: ReduxAction<FetchPublishedPageResourcesPayload>,
) { ) {
try { try {
const { basePageId, pageId } = action.payload; const { applicationId, pageId } = action.payload;
const params = { defaultPageId: basePageId }; const params = { defaultPageId: pageId };
const initConsolidatedApiResponse: ApiResponse<InitConsolidatedApi> = const initConsolidatedApiResponse: ApiResponse<InitConsolidatedApi> =
yield ConsolidatedPageLoadApi.getConsolidatedPageLoadDataView(params); yield ConsolidatedPageLoadApi.getConsolidatedPageLoadDataView(params);
@ -420,11 +420,8 @@ export function* fetchPublishedPageResourcesSaga(
); );
// NOTE: fetchActionsForView is used here to update publishedActions in redux store and not to fetch actions again // NOTE: fetchActionsForView is used here to update publishedActions in redux store and not to fetch actions again
yield put(fetchActionsForView({ applicationId: "", publishedActions })); yield put(fetchActionsForView({ applicationId, publishedActions }));
yield put(fetchAllPageEntityCompletion([executePageLoadActions()])); yield put(fetchAllPageEntityCompletion([executePageLoadActions()]));
yield put({
type: ReduxActionTypes.FETCH_PUBLISHED_PAGE_RESOURCES_SUCCESS,
});
} }
} catch (error) { } catch (error) {
yield put({ yield put({

View File

@ -28,7 +28,7 @@ import { useSelector } from "react-redux";
import BrandingBadge from "./BrandingBadge"; import BrandingBadge from "./BrandingBadge";
import { setAppViewHeaderHeight } from "actions/appViewActions"; import { setAppViewHeaderHeight } from "actions/appViewActions";
import { CANVAS_SELECTOR } from "constants/WidgetConstants"; import { CANVAS_SELECTOR } from "constants/WidgetConstants";
import { fetchPublishedPageResources } from "actions/pageActions"; import { fetchPublishedPageResourcesAction } from "actions/pageActions";
import usePrevious from "utils/hooks/usePrevious"; import usePrevious from "utils/hooks/usePrevious";
import { getIsBranchUpdated } from "../utils"; import { getIsBranchUpdated } from "../utils";
import { APP_MODE } from "entities/App"; import { APP_MODE } from "entities/App";
@ -162,11 +162,9 @@ function AppViewer(props: Props) {
)?.pageId; )?.pageId;
if (pageId) { if (pageId) {
// Used for fetching page resources
dispatch( dispatch(
fetchPublishedPageResources({ fetchPublishedPageResourcesAction(basePageId, baseApplicationId),
basePageId,
pageId,
}),
); );
} }
} }

View File

@ -26,11 +26,6 @@ const appViewReducer = createReducer(initialState, {
[ReduxActionTypes.FETCH_PUBLISHED_PAGE_INIT]: (state: AppViewReduxState) => { [ReduxActionTypes.FETCH_PUBLISHED_PAGE_INIT]: (state: AppViewReduxState) => {
return { ...state, isFetchingPage: true }; return { ...state, isFetchingPage: true };
}, },
[ReduxActionTypes.FETCH_PUBLISHED_PAGE_RESOURCES_INIT]: (
state: AppViewReduxState,
) => {
return { ...state, isFetchingPage: true };
},
[ReduxActionErrorTypes.FETCH_PUBLISHED_PAGE_ERROR]: ( [ReduxActionErrorTypes.FETCH_PUBLISHED_PAGE_ERROR]: (
state: AppViewReduxState, state: AppViewReduxState,
) => { ) => {
@ -49,14 +44,6 @@ const appViewReducer = createReducer(initialState, {
isFetchingPage: false, isFetchingPage: false,
}; };
}, },
[ReduxActionTypes.FETCH_PUBLISHED_PAGE_RESOURCES_SUCCESS]: (
state: AppViewReduxState,
) => {
return {
...state,
isFetchingPage: false,
};
},
[ReduxActionTypes.SET_APP_VIEWER_HEADER_HEIGHT]: ( [ReduxActionTypes.SET_APP_VIEWER_HEADER_HEIGHT]: (
state: AppViewReduxState, state: AppViewReduxState,
action: ReduxAction<number>, action: ReduxAction<number>,