mirror of
https://github.com/JOYCEQL/magic-resume.git
synced 2026-07-03 14:07:11 +02:00
fix: lang page url push
This commit is contained in:
@@ -6,6 +6,7 @@ import Header from "@/components/home/Header";
|
||||
import FeaturesAnimation from "@/components/home/FeaturesAnimation";
|
||||
import HeroAnimation from "@/components/home/HeroAnimation";
|
||||
import { setRequestLocale } from "next-intl/server";
|
||||
import GoDashboard from "@/components/home/GoDashboard";
|
||||
|
||||
type Props = {
|
||||
params: { locale: string };
|
||||
@@ -29,14 +30,15 @@ export default function LandingPage({ params: { locale } }: Props) {
|
||||
{t("hero.subtitle")}
|
||||
</p>
|
||||
<div className="mt-12">
|
||||
<Link href="/dashboard">
|
||||
<GoDashboard>
|
||||
<Button
|
||||
size="lg"
|
||||
type="submit"
|
||||
className="rounded-full px-10 py-6 text-lg font-semibold shadow-lg hover:shadow-xl transition-all duration-300"
|
||||
>
|
||||
{t("hero.cta")}
|
||||
</Button>
|
||||
</Link>
|
||||
</GoDashboard>
|
||||
</div>
|
||||
</HeroAnimation>
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ const ResumeWorkbench = () => {
|
||||
size="sm"
|
||||
className="ml-4"
|
||||
onClick={() => {
|
||||
router.push("/dashboard/settings");
|
||||
router.push("/app/dashboard/settings");
|
||||
}}
|
||||
>
|
||||
<Settings className="w-4 h-4 mr-2" />
|
||||
|
||||
@@ -136,7 +136,7 @@ const Field = ({
|
||||
<span>请先配置 ApiKey 和 模型Id</span>
|
||||
<Button
|
||||
className="p-0 h-auto text-white"
|
||||
onClick={() => router.push("/dashboard/settings")}
|
||||
onClick={() => router.push("/app/dashboard/settings")}
|
||||
>
|
||||
去配置
|
||||
</Button>
|
||||
|
||||
@@ -1,18 +1,10 @@
|
||||
import { useTranslations } from "next-intl";
|
||||
import { Button } from "../ui/button";
|
||||
import { GoDashboardAction } from "@/actions/navigation";
|
||||
|
||||
export default function GoDashboard() {
|
||||
const t = useTranslations("home");
|
||||
|
||||
return (
|
||||
<form action={GoDashboardAction}>
|
||||
<Button
|
||||
variant="default"
|
||||
className="bg-primary hover:opacity-90 text-white h-8 text-sm rounded-full px-4"
|
||||
>
|
||||
{t("header.startButton")}
|
||||
</Button>
|
||||
</form>
|
||||
);
|
||||
export default function GoDashboard({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return <form action={GoDashboardAction}>{children}</form>;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import ThemeToggle from "@/components/shared/ThemeToggle";
|
||||
import GitHubStars from "@/components/shared/GitHubStars";
|
||||
import LanguageSwitch from "../shared/LanguageSwitch";
|
||||
import GoDashboard from "./GoDashboard";
|
||||
import { Button } from "../ui/button";
|
||||
|
||||
export default function Header() {
|
||||
const [mounted, setMounted] = useState(false);
|
||||
@@ -77,7 +78,14 @@ export default function Header() {
|
||||
</div>
|
||||
</ThemeToggle>
|
||||
<GitHubStars />
|
||||
<GoDashboard />
|
||||
<GoDashboard>
|
||||
<Button
|
||||
type="submit"
|
||||
className="bg-primary hover:opacity-90 text-white h-8 text-sm rounded-full px-4"
|
||||
>
|
||||
{t("header.startButton")}
|
||||
</Button>
|
||||
</GoDashboard>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -64,7 +64,7 @@ export const PreviewDock = ({
|
||||
<span>{t("grammarCheck.configurePrompt")}</span>
|
||||
<Button
|
||||
className="p-0 h-auto text-white"
|
||||
onClick={() => router.push("/dashboard/settings")}
|
||||
onClick={() => router.push("/app/dashboard/settings")}
|
||||
>
|
||||
{t("grammarCheck.configureButton")}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user