Skip to content

Commit

Permalink
Turn meetup section into community links section
Browse files Browse the repository at this point in the history
  • Loading branch information
borisghidaglia committed Dec 18, 2024
1 parent 808143d commit c001925
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions app/(not-root)/city/[...id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ export default async function CityPage({
{selectedCity.hackers > 1 ? "hackers" : "hacker"} in {selectedCity.name}
{selectedCity.country ? `, ${selectedCity.country}` : null}
</p>
{selectedCity.meetups === undefined ? null : (
{selectedCity.communityLinks === undefined ? null : (
<>
<div className="mt-2 flex items-center gap-2">
<p className="font-semibold">Meetups</p>
<p className="font-semibold">Community Links</p>
<Popover>
<PopoverTrigger asChild>
<button className="p-1">
Expand All @@ -63,16 +63,16 @@ export default async function CityPage({
className="bg-[#fefef8] px-2 py-1.5"
>
<p className="text-sm">
Want to list your meetup here? Send an email to{" "}
<span className="font-medium">meetup@meet.hn</span>
Want to list your link here? Send an email to{" "}
<span className="font-medium">community@meet.hn</span>
</p>
</PopoverContent>
</Popover>
</div>
<ul className="list-inside">
{selectedCity.meetups.map((m) => (
<li key={m.link}>
<ExternalLink href={m.link}>{m.name}</ExternalLink>
{selectedCity.communityLinks.map((cl) => (
<li key={cl.link}>
<ExternalLink href={cl.link}>{cl.name}</ExternalLink>
</li>
))}
</ul>
Expand Down
4 changes: 2 additions & 2 deletions app/_db/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ export type City = {
country?: string;
countryCode?: string;
createdAt: number;
meetups?: Meetup[];
communityLinks?: CommunityLinks[];
};

export type CityWithoutMetadata = Omit<City, "createdAt">;

type Meetup = { name: string; link: string };
type CommunityLinks = { name: string; link: string };

0 comments on commit c001925

Please sign in to comment.