Skip to content

Commit

Permalink
Merge pull request #1127 from hackclub/malted/fixstasrntoirsntoeisr
Browse files Browse the repository at this point in the history
Slack channel link
  • Loading branch information
malted authored Jan 22, 2025
2 parents 9bf50be + 62be236 commit 60bb40e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/harbor/tavern/tavern-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export type TavernEventItem = {
locality: string
attendeeCount: number
organizers: string[]
channel: string
}

let cachedPeople: TavernPersonItem[] | null,
Expand Down Expand Up @@ -64,6 +65,7 @@ export const getTavernEvents = async () => {
'organizers',
'locality',
'attendees_count',
'channel',
],
})
.all()
Expand All @@ -75,6 +77,7 @@ export const getTavernEvents = async () => {
locality: r.get('locality'),
organizers: r.get('organizers') ?? [],
attendeeCount: r.get('attendees_count'),
channel: r.get('channel'),
})) as TavernEventItem[]

cachedEvents = items
Expand Down
9 changes: 9 additions & 0 deletions src/app/harbor/tavern/tavern.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,15 @@ export default function Tavern() {
onTavernSelect={handleTavernSelect}
/>

{selectedTavern?.channel?.url ? (
<p className="underline text-center my-2 text-lg">
<a href={selectedTavern.channel.url}>
{'--> '}Slack channel for {selectedTavern.city}
{' <--'}
</a>
</p>
) : null}

<Map
tavernEvents={tavernEvents}
tavernPeople={tavernPeople}
Expand Down
1 change: 1 addition & 0 deletions src/app/utils/tavern.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export const getMyTavernLocation: Promise<
locality: foundTavern.get('locality'),
attendeeCount: foundTavern.get('attendees_count'),
organizers: foundTavern.get('organizers'),
channel: foundTavern.get('channel'),
}
}

Expand Down

0 comments on commit 60bb40e

Please sign in to comment.