mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
chore(docs): remove herohack announcement (#5363)
* chore: remove herohack announcement * Update carbon-ad.tsx * chore(docs): fixed lint errors * chore(docs): requested changes * Update carbon-ad.tsx * Update carbon-ad.tsx
This commit is contained in:
parent
1e23994345
commit
2aeb33f3e1
@ -11,13 +11,12 @@ import {useIsMounted} from "@/hooks/use-is-mounted";
|
||||
import {__PROD__, __ENABLE_ADS__} from "@/utils";
|
||||
|
||||
const EA_PROVIDER_RATIO = 0.85;
|
||||
const INTERNAL_AD_ENABLED = true;
|
||||
const PRODUCT_HUNT_ENABLED = false;
|
||||
|
||||
const INTERNAL_AD_INFO = {
|
||||
description: "Join our hackathon, $6k in prizes + 3 months of HeroUI Chat Pro! ↗",
|
||||
title: "Hackathon #HeroHack",
|
||||
img: "https://heroui-chat-assets.nyc3.cdn.digitaloceanspaces.com/herohack.png",
|
||||
url: "https://hack.heroui.chat/twitter?utm_source=heroui.com&utm_medium=ad-banner",
|
||||
const PH_INFO = {
|
||||
description: "Join the conversation and help us get #1 Product of the Week! ↗",
|
||||
title: "We're live on Product Hunt! (30% OFF)",
|
||||
url: "https://ph.heroui.chat?utm_source=heroui.chat&utm_medium=banner",
|
||||
};
|
||||
|
||||
export const CarbonAd: React.FC<unknown> = () => {
|
||||
@ -50,7 +49,7 @@ export const CarbonAd: React.FC<unknown> = () => {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (INTERNAL_AD_ENABLED) return;
|
||||
if (PRODUCT_HUNT_ENABLED) return;
|
||||
|
||||
const shouldShowEthicalAds = Math.random() < EA_PROVIDER_RATIO;
|
||||
|
||||
@ -107,28 +106,25 @@ export const CarbonAd: React.FC<unknown> = () => {
|
||||
};
|
||||
}, [isMounted]);
|
||||
|
||||
if (INTERNAL_AD_ENABLED) {
|
||||
if (PRODUCT_HUNT_ENABLED) {
|
||||
return (
|
||||
<div className="px-2 not-prose hover:opacity-80 transition-[opacity] duration-200 carbon-ad-container max-h-[100px] min-h-[100px] h-[100px] m-0 p-0">
|
||||
<a
|
||||
className="group flex items-center flex gap-4 h-full"
|
||||
href={INTERNAL_AD_INFO.url}
|
||||
className="group flex items-center flex gap-2 h-full"
|
||||
href={PH_INFO.url}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<Image
|
||||
removeWrapper
|
||||
alt="Product Hunt"
|
||||
className="m-0 w-[120px] h-[80px] object-cover rounded-[8px]"
|
||||
src={INTERNAL_AD_INFO.img}
|
||||
className="m-0 w-[80px] h-[80px] object-cover"
|
||||
src="/product-hunt.png"
|
||||
/>
|
||||
<div className="flex flex-col gap-0.5 pointer-events-none">
|
||||
<div className="text-small md:text-medium font-medium no-underline">
|
||||
{INTERNAL_AD_INFO.title}
|
||||
</div>
|
||||
<div className="text-tiny md:text-small text-default-500">
|
||||
{INTERNAL_AD_INFO.description}
|
||||
{PH_INFO.title}
|
||||
</div>
|
||||
<div className="text-tiny md:text-small text-default-500">{PH_INFO.description}</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user