Skip to content

Commit

Permalink
feat(homepage): remove PH banner
Browse files Browse the repository at this point in the history
  • Loading branch information
charlypoly committed Sep 26, 2024
1 parent 03a482c commit cdda367
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 79 deletions.
22 changes: 1 addition & 21 deletions components/LaunchWeekBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,7 @@
"use client";
import AnnouncementBanner from "src/components/AnnouncementBanner";
import ProductHuntAnnouncementBanner from "src/components/ProductHuntAnnouncementBanner";

function useIsItDay3InSFNow() {
const d = new Date();
const localTime = d.getTime();
const localOffset = d.getTimezoneOffset() * 60000;
const utc = localTime + localOffset;
const offset = -7; // UTC of PST is -05.00
const sfDate = new Date(utc + 3600000 * offset);

return (
sfDate.getDate() == 25 &&
sfDate.getMonth() == 8 &&
sfDate.getFullYear() === 2024
);
}

export default function LaunchWeekBanner() {
const day3 = useIsItDay3InSFNow();
return day3 ? (
<ProductHuntAnnouncementBanner />
) : (
return (
<AnnouncementBanner href="/launch-week" className="mb-4">
Inngest Launch Week kicks off September 23rd. Follow along with all of our
updates!
Expand Down
58 changes: 0 additions & 58 deletions components/ProductHuntAnnouncementBanner.tsx

This file was deleted.

0 comments on commit cdda367

Please sign in to comment.