Skip to content

Commit b33f704

Browse files
authored
docs: remove paradise banner (#4037)
## Description Removes paradise promo banner.
1 parent 4a7639d commit b33f704

File tree

1 file changed

+7
-19
lines changed
  • packages/docs-gesture-handler/src/components/TopPromoRotator

1 file changed

+7
-19
lines changed

packages/docs-gesture-handler/src/components/TopPromoRotator/index.tsx

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,6 @@ const PROMOS: readonly Promo[] = [
3434
</>
3535
),
3636
},
37-
{
38-
key: 'paradise',
39-
href: 'https://paradise.swmansion.com?origin=swmansion_bar',
40-
bg: '#FFF4C0',
41-
buttonLabel: 'Learn more',
42-
label: (
43-
<>
44-
<strong>React Native Paradise</strong>
45-
<span className={styles.hiddenOnMobile}>
46-
{' '}
47-
- a week of advanced RN workshops in Croatia!
48-
</span>
49-
</>
50-
),
51-
},
5237
];
5338

5439
// bump when adding promos so users who dismissed banner see the new one
@@ -72,13 +57,16 @@ export default function TopPromoRotator({ onClose }: Props) {
7257
'script[src*="www.googletagmanager.com/gtm.js?id=GTM-WV2G3SQL"]'
7358
);
7459

75-
if (existingScript) return;
60+
if (existingScript) {
61+
return;
62+
}
7663

7764
(function (w: Window, d: Document, s: string, l: string, i: string) {
7865
w.dataLayer = w.dataLayer || [];
66+
// prettier-ignore
7967
w.dataLayer.push({
8068
'gtm.start': new Date().getTime(),
81-
event: 'gtm.js',
69+
'event': 'gtm.js',
8270
});
8371
const f = d.getElementsByTagName(s)[0] as HTMLScriptElement;
8472
const j = d.createElement(s) as HTMLScriptElement;
@@ -91,7 +79,7 @@ export default function TopPromoRotator({ onClose }: Props) {
9179

9280
useEffect(() => {
9381
const id = window.setInterval(() => {
94-
setIndex(i => (i + 1) % promos.length);
82+
setIndex((i) => (i + 1) % promos.length);
9583
}, 5_000);
9684

9785
return () => window.clearInterval(id);
@@ -115,7 +103,7 @@ export default function TopPromoRotator({ onClose }: Props) {
115103
transform: translateY,
116104
transition: 'transform 700ms cubic-bezier(0.22, 1, 0.36, 1)',
117105
}}>
118-
{promos.map(p => (
106+
{promos.map((p) => (
119107
<a
120108
key={p.key}
121109
href={p.href}

0 commit comments

Comments
 (0)