OnPageSwitch we need not `initializeAppViewPage` but instead, only `fetchPublishedPage` this changes fixes that.
16 lines
433 B
TypeScript
16 lines
433 B
TypeScript
import { getSearchQuery } from "utils/helpers";
|
|
import { Location } from "history";
|
|
|
|
export const getIsBranchUpdated = (
|
|
prevLocation: Location<unknown>,
|
|
currentLocation: Location<unknown>,
|
|
) => {
|
|
const { search: search1 } = prevLocation;
|
|
const { search: search2 } = currentLocation;
|
|
|
|
const branch1 = getSearchQuery(search1, "branch");
|
|
const branch2 = getSearchQuery(search2, "branch");
|
|
|
|
return branch1 !== branch2;
|
|
};
|