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

Slack channel link #1127

Merged
merged 1 commit into from
Jan 22, 2025
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
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
Loading