fix: Revert "fix the gitSync related issue" (#36658)
This commit is contained in:
parent
25e83f6603
commit
b582098406
|
|
@ -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,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user