Skip to content
Open
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
123 changes: 60 additions & 63 deletions netlify/functions/event-reminders-hourly/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,77 +197,74 @@ export default async (req: Request) => {
emoji: true,
},
},
...filteredList.reduce<Record<string, unknown>[]>(
(list, event) => {
const eventDate = DateTime.fromISO(event.startDateLocalized);
...filteredList.reduce<Record<string, unknown>[]>((list, event) => {
const eventDate = DateTime.fromISO(event.startDateLocalized);

const titleBlock: Record<string, unknown> = {
type: 'section',
const titleBlock: Record<string, unknown> = {
type: 'section',
text: {
type: 'mrkdwn',
text: `*${
event.title
}*\n<!date^${eventDate.toSeconds()}^{date_long_pretty} {time}|${eventDate.toFormat(
'EEEE, fff',
)}>`,
},
};

if (
event.eventJoinLink &&
event.eventJoinLink.substring(0, 4) === 'http'
) {
titleBlock.accessory = {
type: 'button',
text: {
type: 'mrkdwn',
text: `*${
event.title
}*\n<!date^${eventDate.toSeconds()}^{date_long_pretty} {time}|${eventDate.toFormat(
'EEEE, fff',
)}>`,
type: 'plain_text',
text: 'Join Event',
emoji: true,
},
value: `join_event_${event.id}`,
url: event.eventJoinLink,
action_id: 'button-join-event',
};
}

if (
event.eventJoinLink &&
event.eventJoinLink.substring(0, 4) === 'http'
) {
titleBlock.accessory = {
type: 'button',
text: {
type: 'plain_text',
text: 'Join Event',
emoji: true,
},
value: `join_event_${event.id}`,
url: event.eventJoinLink,
action_id: 'button-join-event',
};
}

return [
...list,
titleBlock,
{
type: 'section',
text: {
type: 'mrkdwn',
text: `*Location:* ${event.eventJoinLink}`,
},
return [
...list,
titleBlock,
{
type: 'section',
text: {
type: 'mrkdwn',
text: `*Location:* ${event.eventJoinLink}`,
},
...(event.eventZoomHostCode
? [
{
type: 'section',
text: {
type: 'mrkdwn',
text: `*Host Code:* ${event.eventZoomHostCode}`,
},
},
...(event.eventZoomHostCode
? [
{
type: 'section',
text: {
type: 'mrkdwn',
text: `*Host Code:* ${event.eventZoomHostCode}`,
},
]
: []),
{
type: 'section',
text: {
type: 'mrkdwn',
text: `*Announcement posted to:* <#${
event.eventSlackAnnouncementsChannelId ||
DEFAULT_SLACK_EVENT_CHANNEL
}>`,
},
},
{
type: 'divider',
},
]
: []),
{
type: 'section',
text: {
type: 'mrkdwn',
text: `*Announcement posted to:* <#${
event.eventSlackAnnouncementsChannelId ||
DEFAULT_SLACK_EVENT_CHANNEL
}>`,
},
];
},
[],
),
},
{
type: 'divider',
},
];
}, []),
],
};

Expand Down
4 changes: 3 additions & 1 deletion netlify/functions/join-coffee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export default async (req: Request) => {
console.log(`Joining ${day}: ${code}`);

const target =
day === 'tuesday' ? requireEnv('ZOOM_TUESDAYS') : requireEnv('ZOOM_THURSDAYS');
day === 'tuesday'
? requireEnv('ZOOM_TUESDAYS')
: requireEnv('ZOOM_THURSDAYS');

return Response.redirect(target, 302);
};
6 changes: 5 additions & 1 deletion netlify/functions/slack/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ class NetlifyReceiver implements Receiver {
});
}

const isValid = verifySlackRequest(rawBody, req.headers, this.signingSecret);
const isValid = verifySlackRequest(
rawBody,
req.headers,
this.signingSecret,
);
if (!isValid.valid) {
console.log('Failed validation:', isValid.reason);
return new Response(isValid.reason, { status: 401 });
Expand Down
51 changes: 24 additions & 27 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,38 +27,35 @@ export default async function Home() {

return (
<>
<div className="hero">
<div className="container pt-5 pb-5 pt-sm-6">
<h1>
<VirtualCoffeeFullBanner />
</h1>
<div className="container pt-5 pb-5 pt-sm-6">
<h1>
<VirtualCoffeeFullBanner />
</h1>

<h2 className="pt-5">
<span>An intimate tech community for all,</span>{' '}
<span>
optimized for{' '}
<strong className="gradient-text-primary">you</strong>
</span>
</h2>
</div>
<h2 className="pt-5">
<span>An intimate tech community for all,</span>{' '}
<span>
optimized for <strong className="gradient-text-primary">you</strong>
</span>
</h2>
</div>

<div className="container pt-3 pb-5">
<div className="bodycopy lead">
<p>
Virtual Coffee is a tech community where friendships are formed
and support is given to people at all stages of their journey.
Join our laid-back twice-weekly conversations and our online
events to connect with people who share your passion for
technology.
</p>
<div className="container pt-3 pb-5">
<div className="bodycopy lead">
<p>
Virtual Coffee is a tech community where friendships are formed and
support is given to people at all stages of their journey. Join our
laid-back twice-weekly conversations and our online events to
connect with people who share your passion for technology.
</p>

<p>
Anyone can join! Whether you&apos;re thinking about getting into
tech or have been in it for decades.
</p>
</div>
<p>
Anyone can join! Whether you&apos;re thinking about getting into
tech or have been in it for decades.
</p>
</div>
</div>

<main id="maincontent">
<div className="container-lg py-5">
<h2 className="text-center mb-5">What we&apos;re up to</h2>
Expand Down
3 changes: 0 additions & 3 deletions src/components/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ export default function Nav() {
<ul
className={`dropdown-menu${isResourcesOpen ? ' show' : ''}`}
aria-labelledby="navbarResourcesDropdown"
style={{
backgroundColor: 'var(--bs-dark)',
}}
>
<li className="mb-2">
<Link
Expand Down