Open liqwtf opened 2 months ago
i also tried creating a custom Link component
import NextLink from "next/link";
import type { ComponentProps } from "react";
import { getCurrentLocale } from "./server";
export default function Link({
href,
children,
...rest
}: Readonly<{ href: string; className?: string; children: React.ReactNode }> &
ComponentProps<typeof NextLink>) {
const locale = getCurrentLocale();
return (
<NextLink href={`/${locale}${href}`} locale={locale} {...rest}>
{children}
</NextLink>
);
}
but when pressed it just refreshes the page
even though in the dev tools it looks good with the href /en/settings
When navigating to another page using the next/link component it throws an error that the page is not included in the params of /[locale]/page
how do i solve this issue in static site generation (output: "export")