Skip to content

Commit

Permalink
fix: typescript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dkoo authored and adekbadek committed Feb 8, 2024
1 parent fdd903f commit dc27973
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions assets/wizards/engagement/components/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ declare global {
preview_post: string;
preview_archive: string;
};
newspack_reader_revenue: {
can_use_name_your_price: boolean;
};
}
}

Expand Down
4 changes: 1 addition & 3 deletions assets/wizards/readerRevenue/views/donation/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* globals newspack_reader_revenue */

/**
* WordPress dependencies.
*/
Expand Down Expand Up @@ -106,7 +104,7 @@ export const DonationAmounts = () => {
const minimumDonationFloat = parseFloat( minimumDonation );

// Whether we can use the Name Your Price extension. If not, layout is forced to Tiered.
const canUseNameYourPrice = newspack_reader_revenue?.can_use_name_your_price;
const canUseNameYourPrice = window.newspack_reader_revenue?.can_use_name_your_price;

return (
<>
Expand Down

0 comments on commit dc27973

Please sign in to comment.