From 12cd54eafe63446471b0366d18cdaaea4ac95532 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Wed, 1 May 2024 20:53:57 +0800 Subject: [PATCH] feat: add survey delete action --- src/client/routes/survey/$surveyId.tsx | 27 ++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/client/routes/survey/$surveyId.tsx b/src/client/routes/survey/$surveyId.tsx index 211ea39..eaaeb9e 100644 --- a/src/client/routes/survey/$surveyId.tsx +++ b/src/client/routes/survey/$surveyId.tsx @@ -2,12 +2,14 @@ import { defaultErrorHandler, defaultSuccessHandler, trpc } from '@/api/trpc'; import { CommonHeader } from '@/components/CommonHeader'; import { CommonWrapper } from '@/components/CommonWrapper'; import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area'; -import { useGlobalRangeDate } from '@/hooks/useGlobalRangeDate'; import { useCurrentWorkspaceId } from '@/store/user'; import { routeAuthBeforeLoad } from '@/utils/route'; import { useTranslation } from '@i18next-toolkit/react'; import { createFileRoute, useNavigate } from '@tanstack/react-router'; import { useEvent } from '@/hooks/useEvent'; +import { AlertConfirm } from '@/components/AlertConfirm'; +import { LuTrash } from 'react-icons/lu'; +import { Button } from '@/components/ui/button'; export const Route = createFileRoute('/survey/$surveyId')({ beforeLoad: routeAuthBeforeLoad, @@ -43,7 +45,28 @@ function PageComponent() { }); return ( - }> + + +