Skip to content

Commit

Permalink
framer: show bank notice around new year
Browse files Browse the repository at this point in the history
  • Loading branch information
maximbaz committed Dec 15, 2024
1 parent 4a99e2f commit 9f3f7a5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions framer/Donation_Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,15 @@ export const showFundraiserName = (Component: any): ComponentType => {
};
};

export const showNearNewYear = (Component: any): ComponentType => {
return (props: any) => {
const now = new Date();
const newYear = new Date(now.getFullYear() + 1, 0, 1);
const daysUntilNewYear = (newYear - now) / (1000 * 60 * 60 * 24);
return daysUntilNewYear > 7 ? null : <Component {...props} />;
};
};

export const inputMessage = (Component: any): ComponentType => {
return (props: any) => {
const [store, setStore] = useStore();
Expand Down

0 comments on commit 9f3f7a5

Please sign in to comment.