Explorar o código

♻️ refactor(home): 优化首页代码结构

- 移除未使用的组件导入,包括Button、Card、Avatar、Badge等UI组件
- 删除未使用的Lucide图标导入
- 移除页面中的"快速链接"卡片组件
- 清理代码中的空行和多余空格,优化代码格式
yourname hai 3 meses
pai
achega
8ff78a86f3
Modificáronse 1 ficheiros con 2 adicións e 44 borrados
  1. 2 44
      src/client/home/pages/HomePage.tsx

+ 2 - 44
src/client/home/pages/HomePage.tsx

@@ -1,18 +1,6 @@
 import React from 'react';
 import { useAuth } from '@/client/home/hooks/AuthProvider';
 import { useNavigate } from 'react-router-dom';
-import { Button } from '@/client/components/ui/button';
-import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/client/components/ui/card';
-import { Avatar, AvatarFallback, AvatarImage } from '@/client/components/ui/avatar';
-import { Badge } from '@/client/components/ui/badge';
-import { 
-  ShieldCheck, 
-  UserCircle, 
-  Smartphone, 
-  LogIn, 
-  UserPlus,
-  ExternalLink
-} from 'lucide-react';
 
 const HomePage: React.FC = () => {
   const { user } = useAuth();
@@ -65,7 +53,7 @@ const HomePage: React.FC = () => {
           )}
         </div>
       </header>
-
+      
       {/* 主内容区 */}
       <main className="flex-grow container mx-auto px-4 pt-24 pb-12">
         {/* 英雄区域 */}
@@ -206,39 +194,9 @@ const HomePage: React.FC = () => {
               </ul>
             </div>
           </div>
-
-          {/* 快速链接 */}
-          <Card className="border-0 shadow-lg">
-            <CardHeader>
-              <CardTitle className="flex items-center space-x-2">
-                <ExternalLink className="h-5 w-5" />
-                <span>快速访问</span>
-              </CardTitle>
-            </CardHeader>
-            <CardContent>
-              <div className="flex flex-wrap gap-4">
-                <Button
-                  variant="outline"
-                  onClick={() => window.open('/admin', '_blank')}
-                  className="flex items-center space-x-2"
-                >
-                  <span>管理后台</span>
-                  <ExternalLink className="h-4 w-4" />
-                </Button>
-                <Button
-                  variant="outline"
-                  onClick={() => window.open('/ui', '_blank')}
-                  className="flex items-center space-x-2"
-                >
-                  <span>API 文档</span>
-                  <ExternalLink className="h-4 w-4" />
-                </Button>
-              </div>
-            </CardContent>
-          </Card>
         </div>
       </main>
-
+      
       {/* 页脚 */}
       <footer className="bg-white border-t border-gray-100 py-8">
         <div className="container mx-auto px-4">