Skip to content

Commit 789964c

Browse files
committed
Add RSS link
1 parent 929c47f commit 789964c

File tree

4 files changed

+47
-23
lines changed

4 files changed

+47
-23
lines changed

src/app/(main)/community/events/events-list.tsx

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@ const ALL_SHOWN = {
6666
export function EventsList({
6767
events,
6868
className,
69+
children,
6970
}: {
7071
events: AnyEvent[]
7172
className?: string
73+
children?: React.ReactNode
7274
}) {
7375
const [kindFilters, setKindFilters] = useState(ALL_SHOWN)
7476

@@ -104,28 +106,31 @@ export function EventsList({
104106

105107
return (
106108
<div className={className}>
107-
<fieldset className="mb-8">
108-
<legend className="typography-menu mt-2">Event type</legend>
109-
<div className="mt-4 flex gap-3">
110-
{Array.from(tags).map(tag => (
111-
<EventFilterTag
112-
key={tag}
113-
kind={tag}
114-
checked={kindFilters[tag]}
115-
disabled={
116-
Object.values(kindFilters).filter(Boolean).length === 1 &&
117-
kindFilters[tag]
118-
}
119-
onChange={event => {
120-
setKindFilters(prev => ({
121-
...prev,
122-
[tag]: event.target.checked,
123-
}))
124-
}}
125-
/>
126-
))}
127-
</div>
128-
</fieldset>
109+
<div className="mb-8 flex items-end justify-between">
110+
<fieldset>
111+
<legend className="typography-menu mt-2">Event type</legend>
112+
<div className="mt-4 flex gap-3">
113+
{Array.from(tags).map(tag => (
114+
<EventFilterTag
115+
key={tag}
116+
kind={tag}
117+
checked={kindFilters[tag]}
118+
disabled={
119+
Object.values(kindFilters).filter(Boolean).length === 1 &&
120+
kindFilters[tag]
121+
}
122+
onChange={event => {
123+
setKindFilters(prev => ({
124+
...prev,
125+
[tag]: event.target.checked,
126+
}))
127+
}}
128+
/>
129+
))}
130+
</div>
131+
</fieldset>
132+
{children}
133+
</div>
129134
<EventsScrollview>
130135
{events.map(event =>
131136
"node" in event ? (

src/app/(main)/community/events/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { BenefitsSection } from "./benefits-section"
99
import { GetYourMeetupNoticedSection } from "./get-your-meetup-noticed-section"
1010
import { BringGraphQLToYourCommunity } from "./bring-graphql-to-your-community"
1111
import { getAllEvents } from "./get-all-events"
12+
import { SubscribeToRssLink } from "./subscribe-to-rss-link"
1213

1314
const ISSUE_TEMPLATE_LINK =
1415
"https://github.com/graphql/community-wg/issues/new?assignees=&labels=event&template=event-submission.yml"
@@ -67,7 +68,9 @@ export default async function EventsPage() {
6768
Add a new event
6869
</Button>
6970
</header>
70-
<EventsList events={upcomingEvents} />
71+
<EventsList events={upcomingEvents}>
72+
<SubscribeToRssLink />
73+
</EventsList>
7174
</section>
7275
)}
7376

2.1 KB
Loading
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import rssImage from "./rss.png"
2+
3+
export function SubscribeToRssLink() {
4+
return (
5+
<a href="/community/events/feed.xml" className="flex items-center">
6+
<span>Subscribe to Events RSS</span>
7+
<img
8+
src={rssImage.src}
9+
alt="RSS Feed"
10+
className="ml-2"
11+
width={24}
12+
height={24}
13+
/>
14+
</a>
15+
)
16+
}

0 commit comments

Comments
 (0)