diff --git a/components/ClientSideRefresh.tsx b/components/ClientSideRefresh.tsx index 88699e48a2..156c68c827 100644 --- a/components/ClientSideRefresh.tsx +++ b/components/ClientSideRefresh.tsx @@ -11,7 +11,11 @@ export default function ClientSideRefresh() { useSWR( router.asPath, () => { - router.replace(router.asPath, undefined, { scroll: false }) + // Remember, in NextJS, the `router.locale` is never including the + // `router.asPath`. So we have to make sure it's always there + // otherwise, after this hook runs, you lose that `/en` prefix + // in the URL on the address bar. + router.replace(`/${router.locale}${router.asPath}`, undefined, { scroll: false }) }, { // Implied here is that `revalidateOnFocus: true` which the default diff --git a/components/landing/TableOfContents.tsx b/components/landing/TableOfContents.tsx index d1011c1f4a..05419deb0c 100644 --- a/components/landing/TableOfContents.tsx +++ b/components/landing/TableOfContents.tsx @@ -12,15 +12,13 @@ type Props = { export const TableOfContents = (props: Props) => { const { items, variant = 'expanded' } = props - const actionItems = (items || []).filter((item) => typeof item !== 'undefined') - return (