-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add product hunt banner to landing page
- Loading branch information
1 parent
bdcae32
commit c4d3dd8
Showing
4 changed files
with
42 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
apps/client/src/pages/home/components/product-hunt-banner.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* eslint-disable lingui/no-unlocalized-strings */ | ||
|
||
import { RocketLaunch } from "@phosphor-icons/react"; | ||
import dayjs from "dayjs"; | ||
import { motion } from "framer-motion"; | ||
|
||
export const ProductHuntBanner = () => { | ||
const timezonePST = "America/Los_Angeles"; | ||
|
||
const startTime = dayjs.tz("2023-11-24 00:01", timezonePST); | ||
const endTime = dayjs.tz("2023-11-25 00:00", timezonePST); | ||
const currentTime = dayjs().tz(timezonePST); | ||
|
||
const isLaunchDay = currentTime.isAfter(startTime) && currentTime.isBefore(endTime); | ||
|
||
if (!isLaunchDay) return null; | ||
|
||
return ( | ||
<a href="https://www.producthunt.com/posts/reactive-resume-v4" target="_blank" rel="noreferrer"> | ||
<motion.div | ||
initial={{ opacity: 0, y: -50, height: 32 }} | ||
animate={{ opacity: 1, y: 0, transition: { delay: 0.9, duration: 0.3 } }} | ||
whileHover={{ height: 48 }} | ||
className="flex w-screen items-center justify-center gap-x-1.5 bg-orange-600 text-xs font-bold leading-relaxed text-orange-50" | ||
> | ||
<RocketLaunch weight="bold" size={12} /> | ||
<span>Support Reactive Resume on Product Hunt today!</span> | ||
</motion.div> | ||
</a> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters