Skip to content

Commit

Permalink
Fix: make entity prop optional (#7644)
Browse files Browse the repository at this point in the history
  • Loading branch information
alaca authored Dec 10, 2024
1 parent 899fa1b commit c9c3e4f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/Campaigns/resources/admin/components/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ export type Campaign = {
defaultFormTitle: string;
};

export type CampaignEntity = {
campaign: Campaign;
hasResolved: boolean;
edit: (data: Campaign) => void
save: () => any
}

/*export interface Campaign {
id: number;
title: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import AddCampaignFormModal from './AddCampaignFormModal';
import DefaultFormNotice
from '@givewp/campaigns/admin/components/CampaignDetailsPage/Components/Notices/DefaultFormNotice';
import apiFetch from "@wordpress/api-fetch";
import {CampaignEntity} from "@givewp/campaigns/admin/components/types";

declare global {
interface Window {
Expand Down Expand Up @@ -268,7 +269,7 @@ const ListTableBlankSlate = (
/>
);

export default function DonationFormsListTable({entity}) {
export default function DonationFormsListTable({entity}: {entity?: CampaignEntity}) {
const [state, setState] = useState<OnboardingStateProps>({
showFeatureNoticeDialog: false,
showDefaultFormTooltip: window.GiveDonationForms.showDefaultFormTooltip,
Expand Down

0 comments on commit c9c3e4f

Please sign in to comment.