-
{t("backToDashboard")}
-
+
diff --git a/packages/core/src/features/alternatives/components/views.tsx b/packages/core/src/features/alternatives/components/views.tsx
index 6153420..df1e432 100644
--- a/packages/core/src/features/alternatives/components/views.tsx
+++ b/packages/core/src/features/alternatives/components/views.tsx
@@ -123,8 +123,8 @@ export async function AlternativesView({
{[base, ...alternatives].map((tool) => (
|
-
{tool.nameEn === base.nameEn && tool.id === base.id
@@ -132,7 +132,7 @@ export async function AlternativesView({
: locale === "zh" && tool.nameZh
? tool.nameZh
: tool.nameEn}
-
+
|
@@ -311,12 +311,12 @@ export async function ComparisonView({
{winnerLabel && (
<>
{" "}{tc("leaning", { name: winnerLabel })}{" "}
-
{winnerLabel}
-
+
.
>
)}
@@ -331,14 +331,14 @@ export async function ComparisonView({
Compare
|
-
+
{nameA}
-
+
|
-
+
{nameB}
-
+
|
diff --git a/packages/core/src/features/auth/components/email-verified-guard.tsx b/packages/core/src/features/auth/components/email-verified-guard.tsx
index b774f2d..cc8e55e 100644
--- a/packages/core/src/features/auth/components/email-verified-guard.tsx
+++ b/packages/core/src/features/auth/components/email-verified-guard.tsx
@@ -1,7 +1,7 @@
"use client";
import * as React from "react";
-import { useRouter } from "next/navigation";
+import { useRouter as useIntlRouter } from "@/i18n/routing";
import { useLocale, useTranslations } from 'next-intl';
import { Mail, AlertCircle } from 'lucide-react';
import { useSession } from "@/lib/auth-client";
@@ -15,7 +15,7 @@ export function EmailVerifiedGuard({
children,
requireEmailVerification = true
}: EmailVerifiedGuardProps) {
- const router = useRouter();
+ const router = useIntlRouter();
const session = useSession();
const locale = useLocale();
const t = useTranslations('auth.emailVerifiedGuard');
@@ -24,7 +24,7 @@ export function EmailVerifiedGuard({
React.useEffect(() => {
if (!session.isPending && !session.data) {
- router.replace(`/${locale}/login`);
+ router.replace(`/login`);
}
}, [router, session.data, session.isPending, locale]);
diff --git a/packages/core/src/features/auth/components/login-form.tsx b/packages/core/src/features/auth/components/login-form.tsx
index 8c32227..df18630 100644
--- a/packages/core/src/features/auth/components/login-form.tsx
+++ b/packages/core/src/features/auth/components/login-form.tsx
@@ -2,7 +2,7 @@
import * as React from "react";
import { useRouter } from "next/navigation";
-import Link from "next/link";
+import { LocaleLink } from "@/components/locale-link";
import { useLocale, useTranslations } from 'next-intl';
import { zodResolver } from "@hookform/resolvers/zod";
import { useForm } from "react-hook-form";
@@ -97,9 +97,9 @@ export function LoginForm() {
footer={
{t('noAccount')}{" "}
-
+
{t('signUpLink')}
-
+
}
socialSlot={
@@ -131,9 +131,9 @@ export function LoginForm() {
autoComplete="current-password"
/>
-
+
{t('forgotPassword')}
-
+
);
diff --git a/packages/core/src/features/auth/components/session-guard.tsx b/packages/core/src/features/auth/components/session-guard.tsx
index 6264a9c..f5f0789 100644
--- a/packages/core/src/features/auth/components/session-guard.tsx
+++ b/packages/core/src/features/auth/components/session-guard.tsx
@@ -13,7 +13,7 @@ export function SessionGuard({ children }: { children: React.ReactNode }) {
React.useEffect(() => {
if (!session.isPending && !session.data) {
- router.replace(`/${locale}/login`);
+ router.replace(`/login`);
}
}, [router, session.data, session.isPending]);
diff --git a/packages/core/src/features/auth/components/signup-form.tsx b/packages/core/src/features/auth/components/signup-form.tsx
index 38c39b5..89765cc 100644
--- a/packages/core/src/features/auth/components/signup-form.tsx
+++ b/packages/core/src/features/auth/components/signup-form.tsx
@@ -2,7 +2,7 @@
import * as React from "react";
import { useRouter } from "next/navigation";
-import Link from "next/link";
+import { LocaleLink } from "@/components/locale-link";
import { useLocale, useTranslations } from 'next-intl';
import { zodResolver } from "@hookform/resolvers/zod";
import { useForm } from "react-hook-form";
@@ -60,7 +60,7 @@ export function SignupForm() {
// 开发模式(默认)注册即已验证 → 直接回跳原页面/首页;生产跳验证提示页
if (process.env.NEXT_PUBLIC_DEV_SKIP_EMAIL_VERIFY === "false") {
- router.push(`/${locale}/check-email`);
+ router.push(`/check-email`);
} else {
const redirect =
typeof window !== "undefined"
@@ -115,9 +115,9 @@ export function SignupForm() {
footer={
{t('hasAccount')}{" "}
-
+
{t('signInLink')}
-
+
}
socialSlot={
diff --git a/packages/core/src/features/claim/components/claim-button.tsx b/packages/core/src/features/claim/components/claim-button.tsx
index 28969e8..d39d6a6 100644
--- a/packages/core/src/features/claim/components/claim-button.tsx
+++ b/packages/core/src/features/claim/components/claim-button.tsx
@@ -53,7 +53,7 @@ export function ClaimToolButton({
setOpen(false);
} else if (result.error === "UNAUTHORIZED") {
router.push(
- `/${locale}/login?redirect=${encodeURIComponent(window.location.pathname)}`
+ `/login?redirect=${encodeURIComponent(window.location.pathname)}`
);
} else if (result.error === "PENDING_EXISTS") {
toast.info(t("pendingExists"));
diff --git a/packages/core/src/features/navigation/components/mobile-navbar.tsx b/packages/core/src/features/navigation/components/mobile-navbar.tsx
index 07c6958..ee96978 100644
--- a/packages/core/src/features/navigation/components/mobile-navbar.tsx
+++ b/packages/core/src/features/navigation/components/mobile-navbar.tsx
@@ -5,6 +5,7 @@ import { useState } from "react";
import { useMotionValueEvent, useScroll } from "framer-motion";
import { IoIosClose, IoIosMenu } from "react-icons/io";
import { Link } from "next-view-transitions";
+import { LocaleLink } from "@/components/locale-link";
import { Button } from "@/components/button";
import { Logo } from "@/components/Logo";
@@ -66,15 +67,15 @@ export const MobileNavbar = () => {
{marketingNavigationKeys.map((navItem) => (
- setOpen(false)}
className="relative block w-full py-2 hover:opacity-70 transition-opacity"
>
{t(navItem.key)}
-
+
))}
@@ -95,20 +96,20 @@ export const MobileNavbar = () => {
)}
setOpen(false)}
className="text-[15px] font-medium text-muted-foreground py-2 hover:text-foreground transition-colors"
>
{t('dashboard')}
-
-