Fix back button cycling in Telegram Mini App

Add replace: true to all navigate() calls in useBackButton hooks
Prevents history cycles when navigating back and forth
All 32 admin pages now use navigate(path, { replace: true })
Back button now goes directly to parent without cycling
This commit is contained in:
c0mrade
2026-02-04 05:59:15 +03:00
parent cb8326309c
commit 55e2068606
33 changed files with 35 additions and 33 deletions

View File

@@ -76,7 +76,7 @@ export default function AdminPromoOfferSend() {
const navigate = useNavigate();
const queryClient = useQueryClient();
useBackButton(() => navigate('/admin/promo-offers'));
useBackButton(() => navigate('/admin/promo-offers', { replace: true }));
const [selectedTemplateId, setSelectedTemplateId] = useState<number | null>(null);
const [sendMode, setSendMode] = useState<'segment' | 'user'>('segment');