File tree Expand file tree Collapse file tree 4 files changed +11
-15
lines changed
packages/i18n/src/locales Expand file tree Collapse file tree 4 files changed +11
-15
lines changed Original file line number Diff line number Diff line change 1+ 'use client' ;
2+
13import { ArrowRightIcon } from '@heroicons/react/24/solid' ;
24import Image from 'next/image' ;
35import { useTranslations } from 'next-intl' ;
Original file line number Diff line number Diff line change 11import BadgeGroup from '@node-core/ui-components/Common/BadgeGroup' ;
22import Footer from '@node-core/ui-components/Containers/Footer' ;
3- import { getTranslations } from 'next-intl/server ' ;
3+ import { useTranslations } from 'next-intl' ;
44import type { FC } from 'react' ;
55
66import { getClientContext } from '#site/client-context' ;
@@ -9,22 +9,15 @@ import { siteNavigation } from '#site/next.json.mjs';
99
1010import 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 = (
Original file line number Diff line number Diff line change 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"
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" : [
Original file line number Diff line number Diff line change 33 "containers" : {
44 "footer" : {
55 "links" : {
6+ "openJSFoundation" : " OpenJS Foundation" ,
67 "trademarkPolicy" : " Trademark Policy" ,
78 "privacyPolicy" : " Privacy Policy" ,
89 "versionSupport" : " Version Support" ,
You can’t perform that action at this time.
0 commit comments