Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add discount code and tweak copy #796

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading