Skip to content

Commit b9a4ff8

Browse files
authored
show whatsapp community url after rsvp (#90)
1 parent 9138e6e commit b9a4ff8

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

components/registration/dashboard-container.tsx

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
Sparkles,
1919
UserPlus,
2020
Lightbulb,
21+
MessageCircle,
2122
} from "lucide-react";
2223
import { FormSection } from "./form-section";
2324
import { FormInput } from "./form-input";
@@ -41,7 +42,7 @@ import {
4142
} from "@/components/ui/alert-dialog";
4243
import { Spinner } from "@/components/ui/spinner";
4344
import { useToast } from "@/hooks/use-toast";
44-
import { TEAM_SIZE, isShortlistAnnounced } from "@/lib/constants";
45+
import { TEAM_SIZE, isShortlistAnnounced, WHATSAPP_COMMUNITY_URL } from "@/lib/constants";
4546
import { HudFrame } from "./hud-frame";
4647

4748
interface Team {
@@ -289,6 +290,30 @@ function StatusStrip({
289290
)
290291
)}
291292
</div>
293+
294+
{/* Once locked in, surface the WhatsApp community where all further
295+
event announcements are made. */}
296+
{status === "confirmed" && WHATSAPP_COMMUNITY_URL && (
297+
<a
298+
href={WHATSAPP_COMMUNITY_URL}
299+
target="_blank"
300+
rel="noopener noreferrer"
301+
className="group inline-flex items-center gap-3 self-start rounded-md border border-brand/40 bg-brand/10 hover:bg-brand/15 hover:border-brand/60 transition-colors px-3.5 py-2.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand min-h-[44px]"
302+
>
303+
<span className="shrink-0 inline-flex w-7 h-7 items-center justify-center rounded-md bg-brand/15 border border-brand/40">
304+
<MessageCircle className="w-3.5 h-3.5 text-brand" />
305+
</span>
306+
<span className="flex flex-col min-w-0">
307+
<span className="font-mono text-[10.5px] uppercase tracking-[0.22em] text-brand">
308+
Join the WhatsApp community
309+
</span>
310+
<span className="text-[12.5px] text-ink-secondary">
311+
All further event announcements happen here. Tap to join.
312+
</span>
313+
</span>
314+
<ArrowRight className="w-4 h-4 text-brand ml-2 shrink-0 transition-transform group-hover:translate-x-0.5" />
315+
</a>
316+
)}
292317
</div>
293318
</div>
294319
);

lib/constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ export const RSVP_DEADLINE = new Date("2026-07-24T21:00:00+05:30");
2626
/** Public announcement time for the /shortlisted teams page. */
2727
export const SHORTLIST_ANNOUNCE_TIME = new Date("2026-07-21T12:00:00+05:30");
2828

29+
export const WHATSAPP_COMMUNITY_URL =
30+
process.env.NEXT_PUBLIC_WHATSAPP_COMMUNITY_URL || "";
31+
2932
/** True once the registration / team-formation window has closed. */
3033
export const isRegistrationClosed = (now: Date = new Date()): boolean =>
3134
now > REGISTRATION_DEADLINE;

0 commit comments

Comments
 (0)