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 {
pageId: string;
basePageId: string;
applicationId: string;
}
export const fetchPublishedPageAction = (
@ -297,14 +297,14 @@ export const clonePageSuccess = ({
// 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
export const fetchPublishedPageResources = ({
basePageId,
pageId,
}: FetchPublishedPageResourcesPayload): ReduxAction<FetchPublishedPageResourcesPayload> => ({
export const fetchPublishedPageResourcesAction = (
pageId: string,
applicationId: string,
): ReduxAction<FetchPublishedPageResourcesPayload> => ({
type: ReduxActionTypes.FETCH_PUBLISHED_PAGE_RESOURCES_INIT,
payload: {
pageId,
basePageId,
applicationId,
},
});

View File

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

View File

@ -395,9 +395,9 @@ export function* fetchPublishedPageResourcesSaga(
action: ReduxAction<FetchPublishedPageResourcesPayload>,
) {
try {
const { basePageId, pageId } = action.payload;
const { applicationId, pageId } = action.payload;
const params = { defaultPageId: basePageId };
const params = { defaultPageId: pageId };
const initConsolidatedApiResponse: ApiResponse<InitConsolidatedApi> =
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
yield put(fetchActionsForView({ applicationId: "", publishedActions }));
yield put(fetchActionsForView({ applicationId, publishedActions }));
yield put(fetchAllPageEntityCompletion([executePageLoadActions()]));
yield put({
type: ReduxActionTypes.FETCH_PUBLISHED_PAGE_RESOURCES_SUCCESS,
});
}
} catch (error) {
yield put({

View File

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

View File

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