mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-04 15:06:37 +08:00
[重构] 清除旧兼容层
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
'use client';
|
||||
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import { LoadingState } from '@/components/feedback/loading-state';
|
||||
|
||||
interface LegacyRouteRedirectProps {
|
||||
href: string;
|
||||
}
|
||||
|
||||
export function LegacyRouteRedirect({ href }: LegacyRouteRedirectProps) {
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
router.replace(href);
|
||||
}, [href, router]);
|
||||
|
||||
return (
|
||||
<main className='flex min-h-screen items-center justify-center px-4 py-8'>
|
||||
<LoadingState className='w-full max-w-md' />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user