Skip to content

Commit 044454c

Browse files
committed
fix: fix current weirdness from main
1 parent 6fded37 commit 044454c

File tree

4 files changed

+11
-15
lines changed

4 files changed

+11
-15
lines changed

apps/site/app/[locale]/not-found.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import { ArrowRightIcon } from '@heroicons/react/24/solid';
24
import Image from 'next/image';
35
import { useTranslations } from 'next-intl';

apps/site/components/withFooter.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import BadgeGroup from '@node-core/ui-components/Common/BadgeGroup';
22
import Footer from '@node-core/ui-components/Containers/Footer';
3-
import { getTranslations } from 'next-intl/server';
3+
import { useTranslations } from 'next-intl';
44
import type { FC } from 'react';
55

66
import { getClientContext } from '#site/client-context';
@@ -9,22 +9,15 @@ import { siteNavigation } from '#site/next.json.mjs';
99

1010
import WithNodeRelease from './withNodeRelease';
1111

12-
const WithFooter: FC = async () => {
13-
const t = await getTranslations();
12+
const WithFooter: FC = () => {
13+
const t = useTranslations();
1414
const { pathname } = getClientContext();
1515

1616
const { socialLinks, footerLinks } = siteNavigation;
1717

18-
const updatedFooterLinks = footerLinks
19-
.slice(0, -1)
20-
.map(link => ({ ...link, text: t(link.text) }));
21-
22-
// Add OpenJS link
23-
updatedFooterLinks.push(footerLinks.at(-1)!);
24-
2518
const navigation = {
2619
socialLinks: socialLinks,
27-
footerLinks: updatedFooterLinks,
20+
footerLinks: footerLinks.map(link => ({ ...link, text: t(link.text) })),
2821
};
2922

3023
const primary = (

apps/site/navigation.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
}
3333
},
3434
"footerLinks": [
35+
{
36+
"link": "https://openjsf.org/",
37+
"text": "components.containers.footer.links.openJSFoundation"
38+
},
3539
{
3640
"link": "https://trademark-policy.openjsf.org/",
3741
"text": "components.containers.footer.links.trademarkPolicy"
@@ -51,10 +55,6 @@
5155
{
5256
"link": "https://github.com/nodejs/node/security/policy",
5357
"text": "components.containers.footer.links.security"
54-
},
55-
{
56-
"link": "https://openjsf.org/",
57-
"text": "OpenJS Foundation"
5858
}
5959
],
6060
"socialLinks": [

packages/i18n/src/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"containers": {
44
"footer": {
55
"links": {
6+
"openJSFoundation": "OpenJS Foundation",
67
"trademarkPolicy": "Trademark Policy",
78
"privacyPolicy": "Privacy Policy",
89
"versionSupport": "Version Support",

0 commit comments

Comments
 (0)