refactor(web): migrate from Next.js to Vite + React Router

This commit is contained in:
RockChinQ
2026-04-03 11:24:14 +08:00
parent e701daa8e0
commit 2a4ba237c4
1441 changed files with 917663 additions and 3671 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
'use client';
import React from 'react';
+5 -5
View File
@@ -1,4 +1,4 @@
'use client';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import {
@@ -28,11 +28,11 @@ import {
} from '@/components/ui/form';
import { useState } from 'react';
import { httpClient } from '@/app/infra/http/HttpClient';
import { useRouter } from 'next/navigation';
import { useNavigate } from 'react-router-dom';
import { Mail, Lock, ArrowLeft } from 'lucide-react';
import { toast } from 'sonner';
import { useTranslation } from 'react-i18next';
import Link from 'next/link';
import { Link } from 'react-router-dom';
import { ThemeToggle } from '@/components/ui/theme-toggle';
const REGEXP_ONLY_DIGITS_AND_CHARS = /^[0-9a-zA-Z]+$/;
@@ -45,7 +45,7 @@ const formSchema = (t: (key: string) => string) =>
});
export default function ResetPassword() {
const router = useRouter();
const navigate = useNavigate();
const { t } = useTranslation();
const [isResetting, setIsResetting] = useState(false);
@@ -72,7 +72,7 @@ export default function ResetPassword() {
.resetPassword(email, recoveryKey, newPassword)
.then(() => {
toast.success(t('resetPassword.resetSuccess'));
router.push('/login');
navigate('/login');
})
.catch(() => {
toast.error(t('resetPassword.resetFailed'));