Skip to content

Commit

Permalink
add location support for workshops
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Sep 20, 2024
1 parent 1c23ffc commit 60a4474
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
title: workshop.title,
slug: workshop.slug,
promoName,
location: event.location,
dismissTimeSeconds: Math.min(
Math.max(
// one quarter of the time until the promoEndTime (in seconds)
Expand Down Expand Up @@ -241,6 +242,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
title: e.title,
slug: workshop.slug,
promoName,
location: e.location,
dismissTimeSeconds: Math.min(
Math.max(
// one quarter of the time until the promoEndTime (in seconds)
Expand Down Expand Up @@ -475,10 +477,15 @@ function App() {
<p className="flex items-center gap-1">
<LaptopIcon />
<span>
Join Kent for an interactive{' '}
Join Kent for a{' '}
<Link to="/workshops" className="underline">
live workshop
</Link>
{e.location
? e.location === 'Remote'
? null
: ` in ${e.location}`
: null}
</span>
</p>
<Link
Expand Down
1 change: 1 addition & 0 deletions content/workshops/advanced-react-apis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ events:
quantity: 50
url: https://www.reactindia.io/workshops
date: 2024-10-17
location: 'Goa, India 🇮🇳'
convertKitTag: '896447'
problemStatements:
part1:
Expand Down
1 change: 1 addition & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ type ManualWorkshopEvent = {
url: string
quantity?: number
remaining?: number
location?: string
date: string
}

Expand Down

0 comments on commit 60a4474

Please sign in to comment.