feat:对返回上一页做了处理

This commit is contained in:
许永平
2025-07-05 21:09:28 +08:00
parent 7b29660a51
commit 0385a4cfa9
13 changed files with 317 additions and 23 deletions

View File

@@ -1,5 +1,6 @@
import React, { useState, useEffect, useRef, useCallback } from 'react';
import { useNavigate } from 'react-router-dom';
import { smartGoBack } from '@/utils/navigation';
import { ChevronLeft, Search, RefreshCw, ArrowRightLeft, AlertCircle, Loader2 } from 'lucide-react';
import { fetchWechatAccountList, transformWechatAccount } from '@/api/wechat-accounts';
import { useToast } from '@/components/ui/toast';
@@ -155,7 +156,7 @@ export default function WechatAccounts() {
<div className="flex items-center px-4 py-3">
<button
className="p-2 hover:bg-gray-100 rounded-lg transition-colors"
onClick={() => navigate(-1)}
onClick={() => smartGoBack(navigate)}
>
<ChevronLeft className="h-5 w-5" />
</button>