Explorar o código

♻️ refactor(admin): 清理未使用的导入和类型定义

- 移除MembershipPlans.tsx中未使用的zod导入和MembershipPlanListResponse类型
- 移除Payments.tsx中未使用的zod导入和Eye图标
- 移除Register.tsx中未使用的Eye和EyeOff图标
yourname hai 3 meses
pai
achega
4b3c1096b2

+ 0 - 2
src/client/admin/pages/MembershipPlans.tsx

@@ -43,7 +43,6 @@ import { Plus, Edit, Trash2, Search } from 'lucide-react';
 import { membershipPlanClient } from '@/client/api';
 import type { InferResponseType, InferRequestType } from 'hono/client';
 import { toast } from 'sonner';
-import { z } from 'zod';
 import { CreateMembershipPlanDto, UpdateMembershipPlanDto, MembershipType } from '@/server/modules/membership/membership-plan.schema';
 import { format } from 'date-fns';
 import { Badge } from '@/client/components/ui/badge';
@@ -52,7 +51,6 @@ import { Skeleton } from '@/client/components/ui/skeleton';
 
 // 类型定义
 type MembershipPlanResponse = InferResponseType<typeof membershipPlanClient.$get, 200>['data'][0];
-type MembershipPlanListResponse = InferResponseType<typeof membershipPlanClient.$get, 200>;
 type CreateMembershipPlanRequest = InferRequestType<typeof membershipPlanClient.$post>['json'];
 type UpdateMembershipPlanRequest = InferRequestType<typeof membershipPlanClient[':id']['$put']>['json'];
 

+ 1 - 2
src/client/admin/pages/Payments.tsx

@@ -5,7 +5,6 @@ import { zodResolver } from '@hookform/resolvers/zod';
 import { format } from 'date-fns';
 import { zhCN } from 'date-fns/locale';
 import { toast } from 'sonner';
-import { z } from 'zod';
 
 import {
   Table,
@@ -49,7 +48,7 @@ import {
   SelectTrigger,
   SelectValue,
 } from '@/client/components/ui/select';
-import { Search, Eye, Edit, Trash2, Plus } from 'lucide-react';
+import { Search, Edit, Trash2, Plus } from 'lucide-react';
 
 import type { InferRequestType, InferResponseType } from 'hono/client';
 import { paymentClient } from '@/client/api';

+ 1 - 1
src/client/admin/pages/Register.tsx

@@ -10,7 +10,7 @@ import { Button } from '@/client/components/ui/button';
 import { Input } from '@/client/components/ui/input';
 import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/client/components/ui/card';
 import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@/client/components/ui/form';
-import { Eye, EyeOff, User, Lock, Mail } from 'lucide-react';
+import { User, Lock, Mail } from 'lucide-react';
 
 const registerSchema = z.object({
   username: z.string()