Skip to content

Commit

Permalink
disable ad dialog for spif shop
Browse files Browse the repository at this point in the history
  • Loading branch information
JLaferri committed Dec 25, 2024
1 parent 650e5da commit ccafeeb
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/renderer/components/ad_dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,23 @@ import useMediaQuery from "@mui/material/useMediaQuery";
import { useState } from "react";

import { ExternalLink as A } from "@/components/external_link";
import spifShopImage from "@/styles/images/ads/spif-slippi-shop-full-size.png";

const getActiveCampaign = () => {
const now = new Date();
const start = new Date("2024-12-25");
const end = new Date("2025-01-12");
// import spifShopImage from "@/styles/images/ads/spif-slippi-shop-full-size.png";

if (now >= start && now <= end) {
return { image: spifShopImage, seenKey: "SPIF_SHOP_SEEN" };
}
const getActiveCampaign = ():
| {
image: string;
seenKey: string;
}
| undefined => {
// const now = new Date();

// // I'm disabling this because the banner by itself is probably enough. This feels quite heavy.
// const start = new Date("2024-12-25");
// const end = new Date("2025-01-12");
// if (now >= start && now <= end) {
// return { image: spifShopImage, seenKey: "SPIF_SHOP_SEEN" };
// }

return undefined;
};
Expand Down

0 comments on commit ccafeeb

Please sign in to comment.