diff --git a/api/src/tablo.ts b/api/src/tablo.ts index 351c5dc..496aa14 100644 --- a/api/src/tablo.ts +++ b/api/src/tablo.ts @@ -451,8 +451,12 @@ tabloRouter.post("/join", async (c) => { await supabase.from("tablo_invites").delete().eq("id", invite_id); - const channel = streamServerClient.channel("messaging", tablo_id); - await channel.addMembers([joiner.id]); + try { + const channel = streamServerClient.channel("messaging", tablo_id); + await channel.addMembers([joiner.id]); + } catch (error) { + console.error("error adding member to channel", error); + } return c.json({ message: "Tablo joined successfully" }); }); diff --git a/ui/src/pages/join.tsx b/ui/src/pages/join.tsx index 3439062..02970bf 100644 --- a/ui/src/pages/join.tsx +++ b/ui/src/pages/join.tsx @@ -1,6 +1,9 @@ +import { Button } from "@ui/components/ui/button"; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@ui/components/ui/card"; import { useJoinTablo } from "@ui/hooks/invite"; import { toast } from "@ui/lib/toast"; import { useUser } from "@ui/providers/UserStoreProvider"; +import { CheckCircle2Icon, XCircleIcon } from "lucide-react"; import { useNavigate, useParams, useSearchParams } from "react-router-dom"; export const JoinPage = () => { @@ -12,39 +15,35 @@ export const JoinPage = () => { const [searchParams] = useSearchParams(); const token = searchParams.get("token"); - if (!tablo_name || !token) { - toast.add( - { - title: "Invitation invalide", - description: "Veuillez vérifier le lien d'invitation", - type: "error", - }, - { - timeout: 2000, - } - ); - navigate("/"); - } - return ( -
+
-

+

Rejoindre le tablo "{tablo_name}"

-
-
-

{tablo_name}

-

Vous avez été invité(e) à rejoindre ce tablo

-
+ + + {tablo_name} + Vous avez été invité(e) à rejoindre ce tablo + -
- + - -
-
+ + +
);