Skip to content

Commit

Permalink
Add discount code and tweak copy (#796)
Browse files Browse the repository at this point in the history
  • Loading branch information
nimzco authored Oct 14, 2024
1 parent 98ef110 commit 68d4c87
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
27 changes: 27 additions & 0 deletions src/components/SponsoredConference/SponsoredConference.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export interface SponsoredConf {
imgDark: string
url: string
tagline: string
discountText?: string
discountUrl?: string
sponsorDateStart: string
sponsorDateEnd: string
}
Expand Down Expand Up @@ -49,6 +51,10 @@ const SponsoredConference = () => {
</Heading>
<p>{sponsorConference.conferenceDate}</p>
<p className={styles.Footer}>{sponsorConference.tagline}</p>
<DiscountText
text={sponsorConference.discountText}
url={sponsorConference.discountUrl}
/>
</div>
<Link routed url='/pages/sponsorships' className={styles.sponsored}>
sponsored
Expand All @@ -58,4 +64,25 @@ const SponsoredConference = () => {
)
}

interface DiscountProps {
text?: string
url?: string
}
const DiscountText = ({ text, url }: DiscountProps) => {
if (!text) {
return null
}
if (url) {
return (
<p className={styles.Footer}>
<Link url={url} external>
{text}
</Link>
</p>
)
} else {
return <p className={styles.Footer}>{text}</p>
}
}

export default SponsoredConference
6 changes: 4 additions & 2 deletions src/components/SponsoredConference/sponsors.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@
},
{
"name": "JSNation US",
"conferenceDate": "November 18 (hybrid in New York) & November 21 (remote), 2024",
"conferenceDate": "November 18 & 21, 2024 | New York & Online",
"img": "/sponsors/jsnation.png",
"imgDark": "/sponsors/jsnation-dark.png",
"url": "https://jsnation.us?utm_source=website&utm_medium=confstech",
"tagline": "The main JS conference in the US - 50+ stellar thinkers, shaping JS’s future - 700 explorers, immersed in dev discovery 10K devs, connected worldwide",
"tagline": "Join 800+ developers in the biggest US Planetarium with 50+ JavaScript stars. Connect with industry leaders and explore emerging trends.",
"discountText": "Discount Code: CONFSTECH10 for 10% off!",
"discountUrl": "https://ti.to/gitnation/jsnation-us-edition/discount/CONFSTECH10",
"sponsorDateStart": "2024-10-01",
"sponsorDateEnd": "2024-11-01"
},
Expand Down

0 comments on commit 68d4c87

Please sign in to comment.