From 9c1d672c1ebe724de5b096f679adc78dce31ba43 Mon Sep 17 00:00:00 2001 From: yiling Date: Fri, 29 May 2026 22:57:07 +0800 Subject: [PATCH] feat(notification): use Shadcn Switch for project card context menu notification toggle --- src/ui/routes/teams/$teamId/index.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/ui/routes/teams/$teamId/index.tsx b/src/ui/routes/teams/$teamId/index.tsx index a7a0e843..92e1cd14 100644 --- a/src/ui/routes/teams/$teamId/index.tsx +++ b/src/ui/routes/teams/$teamId/index.tsx @@ -31,6 +31,7 @@ import { useQuery, useSuspenseQuery, useQueryClient } from '@tanstack/react-quer import { createFileRoute, useNavigate } from '@tanstack/react-router' import { MoreHorizontal, PlusIcon } from 'lucide-react' import { useState } from 'react' +import { Switch } from '@/ui/components/ui/switch' import { Input } from '@/ui/components/ui/input' function TeamPage() { @@ -308,14 +309,17 @@ function TeamPage() { Project Settings { - e.stopPropagation() + className="flex items-center justify-between gap-4 cursor-pointer" + onSelect={(e) => { + e.preventDefault() toggleProjectNotificationsMutation.mutate(project) }} > - {project.enableNotification - ? 'Disable Notifications' - : 'Enable Notifications'} + Notification +