diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/_components/settings-cards/dedicated-support.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/_components/settings-cards/dedicated-support.tsx index 78b86ec7663..8d175d135c7 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/_components/settings-cards/dedicated-support.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/_components/settings-cards/dedicated-support.tsx @@ -1,5 +1,7 @@ "use client"; import { useMutation } from "@tanstack/react-query"; +import { ExternalLinkIcon } from "lucide-react"; +import Link from "next/link"; import { useState } from "react"; import { toast } from "sonner"; import { createDedicatedSupportChannel } from "@/api/dedicated-support"; @@ -16,7 +18,7 @@ import { useDashboardRouter } from "@/lib/DashboardRouter"; const CHANNEL_TYPES = { slack: "Slack", - telegram: "Telegram (Coming Soon)", + telegram: "Telegram", } as const; type ChannelType = keyof typeof CHANNEL_TYPES; @@ -57,6 +59,7 @@ export function TeamDedicatedSupportCard(props: { const channelType = props.team.dedicatedSupportChannel?.type; const channelName = props.team.dedicatedSupportChannel?.name; + const channelLink = props.team.dedicatedSupportChannel?.link; const hasDefaultTeamName = props.team.name.startsWith("Your Projects"); @@ -73,11 +76,27 @@ export function TeamDedicatedSupportCard(props: { }} noPermissionText={undefined} > -
-

- Your dedicated support channel: #{channelName}{" "} - {CHANNEL_TYPES[channelType]} -

+
+
+
+
+

{channelName}

+

+ {CHANNEL_TYPES[channelType]} channel +

+
+ {channelType === "telegram" && channelLink && ( + + Join channel + + + )} +
+
); @@ -145,15 +164,11 @@ export function TeamDedicatedSupportCard(props: { value={selectedChannelType} > - + {Object.entries(CHANNEL_TYPES).map(([value, name]) => ( - + {name} ))} diff --git a/packages/service-utils/src/core/api.ts b/packages/service-utils/src/core/api.ts index 4dce9d35ae6..368c9707468 100644 --- a/packages/service-utils/src/core/api.ts +++ b/packages/service-utils/src/core/api.ts @@ -150,6 +150,7 @@ export type TeamResponse = { dedicatedSupportChannel: { type: "slack" | "telegram"; name: string; + link: string | null; } | null; };