Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const SponsorFormsTab = ({
useEffect(() => {
getSponsorManagedForms();
getSponsorCustomizedForms();
}, []);
}, [sponsor?.id]);

const handleManagedPageChange = (page) => {
const { perPage, order, orderDir } = managedForms;
Expand Down Expand Up @@ -157,7 +157,8 @@ const SponsorFormsTab = ({
);
};

const handleSaveFormFromTemplate = (entity) => saveSponsorManagedForm(entity).then(() => {
const handleSaveFormFromTemplate = (entity) =>
saveSponsorManagedForm(entity).then(() => {
const { perPage, order, orderDir } = managedForms;
getSponsorManagedForms(
term,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import UploadDialog from "../../../../../components/upload-dialog";
import showConfirmDialog from "../../../../../components/mui/showConfirmDialog";

const SponsorMediaUploadTab = ({
sponsor,
sponsorRequests,
generalRequests,
getSponsorMURequests,
Expand All @@ -44,7 +45,7 @@ const SponsorMediaUploadTab = ({
useEffect(() => {
getSponsorMURequests();
getGeneralMURequests();
}, []);
}, [sponsor?.id]);

const handleSponsorPageChange = (page) => {
const { perPage, order, orderDir } = sponsorRequests;
Expand Down Expand Up @@ -271,8 +272,9 @@ const SponsorMediaUploadTab = ({
);
};

const mapStateToProps = ({ sponsorPageMUListState }) => ({
...sponsorPageMUListState
const mapStateToProps = ({ sponsorPageMUListState, currentSponsorState }) => ({
...sponsorPageMUListState,
sponsor: currentSponsorState.entity
});

export default connect(mapStateToProps, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const SponsorPagesTab = ({
useEffect(() => {
getSponsorManagedPages();
getSponsorCustomizedPages();
}, []);
}, [sponsor?.id]);

const handleManagedPageChange = (page) => {
const { perPage, order, orderDir } = managedPages;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
} from "../../../../../utils/constants";

const SponsorPurchasesTab = ({
sponsor,
purchases,
term,
order,
Expand All @@ -43,7 +44,7 @@ const SponsorPurchasesTab = ({
}) => {
useEffect(() => {
getSponsorPurchases();
}, []);
}, [sponsor?.id]);

const handlePageChange = (page) => {
getSponsorPurchases(term, page, perPage, order, orderDir);
Expand Down Expand Up @@ -195,8 +196,12 @@ const SponsorPurchasesTab = ({
);
};

const mapStateToProps = ({ sponsorPagePurchaseListState }) => ({
...sponsorPagePurchaseListState
const mapStateToProps = ({
sponsorPagePurchaseListState,
currentSponsorState
}) => ({
...sponsorPagePurchaseListState,
sponsor: currentSponsorState.entity
});

export default connect(mapStateToProps, {
Expand Down
Loading