Skip to content

Commit 008fb72

Browse files
committed
add promo banner
1 parent ef8657b commit 008fb72

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import "../../styles/icons.css";
2+
declare interface Props {
3+
url: string;
4+
}
5+
6+
function PromoBanner({ url }: Props) {
7+
//no promo running
8+
//return null;
9+
10+
function handleButtonClick() {
11+
if (typeof _paq !== "undefined") {
12+
_paq.push([
13+
"trackEvent",
14+
"Promo CTA",
15+
"Promo CTA button",
16+
"Go to Survey",
17+
]);
18+
}
19+
}
20+
21+
return (
22+
<div
23+
id="promo-banner"
24+
className="flex items-center justify-center min-h-24 bg-yellow-300 gap-4 flex-wrap"
25+
>
26+
<div className="flex gap-2 flex-wrap my-4 mx-2">
27+
<p className="text-lg text-gray-900">🔥Limited-Time Offer: 80% OFF</p>
28+
<p className="text-lg text-gray-900 font-bold">
29+
Polyspectral MBC Multiband Compressor! Now $9.99🔥
30+
</p>
31+
</div>
32+
<a
33+
href="https://musehub.com/?mtm_campaign=audacityteam&mtm_content=bannerad"
34+
id="promo-button"
35+
onClick={handleButtonClick}
36+
className="flex text-lg font-bold h-12 my-4 justify-center items-center px-4 border-2 border-gray-900 rounded-md hover:bg-gray-900 hover:text-white"
37+
>
38+
Get it on the Muse Hub
39+
</a>
40+
</div>
41+
);
42+
}
43+
44+
export default PromoBanner;

src/layouts/BaseLayout.astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import CookieConsent from "../components/banner/CookieConsent";
55
import "../styles/input.css";
66
import BetaBanner from "../components/banner/BetaBanner";
77
import SurveyBanner from "../components/banner/SurveyBanner";
8+
import PromoBanner from "../components/banner/PromoBanner";
89
910
export interface Props {
1011
title: string;
@@ -44,6 +45,7 @@ const {
4445
<NavigationReact client:load currentURL={Astro.request.url} />
4546
<BetaBanner client:load url={Astro.request.url}/>
4647
<SurveyBanner client:load url={Astro.request.url}/>
48+
<PromoBanner client:load url={Astro.request.url}/>
4749
</header>
4850

4951
<div class="flex-1">

0 commit comments

Comments
 (0)