/** * KRA - Reload Page * Used for route refresh without full page reload */ import React, { useEffect } from 'react'; import { Spin } from 'antd'; import { history, useLocation } from '@umijs/max'; const ReloadPage: React.FC = () => { const location = useLocation(); useEffect(() => { const params = new URLSearchParams(location.search); const redirect = params.get('redirect') || '/'; // Small delay to ensure the route change is processed const timer = setTimeout(() => { history.replace(redirect); }, 100); return () => clearTimeout(timer); }, [location.search]); return (
); }; export default ReloadPage;