diff --git a/pages/community/index.tsx b/pages/community/index.tsx
index e8a68b23528f..7b76b6407d36 100644
--- a/pages/community/index.tsx
+++ b/pages/community/index.tsx
@@ -3,6 +3,7 @@ import React from 'react';
import { CardType } from '@/types/components/community/CardPropsType';
import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading';
+import { makeStaticProps } from '@/utils/getStatic';
import Card from '../../components/community/Card';
import Header from '../../components/community/Header';
@@ -14,6 +15,10 @@ import Heading from '../../components/typography/Heading';
import eventsData from '../../config/meetings.json';
import { getEvents } from '../../utils/staticHelpers';
+const getStaticProps = makeStaticProps(['common']);
+
+export { getStaticProps };
+
interface Event {
title: string;
date: moment.Moment;
diff --git a/pages/community/tsc.tsx b/pages/community/tsc.tsx
index 755652736f1b..aef6af4c7995 100644
--- a/pages/community/tsc.tsx
+++ b/pages/community/tsc.tsx
@@ -1,7 +1,7 @@
import { sortBy } from 'lodash';
-import React, { useState } from 'react';
import type { Tsc } from '@/types/pages/community/Community';
+import { makeStaticProps } from '@/utils/getStatic';
import IconGithub from '../../components/icons/Github';
import IconLinkedIn from '../../components/icons/LinkedIn';
@@ -11,6 +11,10 @@ import NewsletterSubscribe from '../../components/NewsletterSubscribe';
import TextLink from '../../components/typography/TextLink';
import TSCMembersList from '../../config/MAINTAINERS.json';
+const getStaticProps = makeStaticProps(['common']);
+
+export { getStaticProps };
+
interface SocialLinkProps {
href: string;
social: string;
@@ -66,11 +70,9 @@ function addAdditionalUserInfo(user: Tsc) {
* @returns The Twitter SVG component.
*/
function TwitterSVG() {
- const [isHovered, setIsHovered] = useState(false);
-
return (
-
setIsHovered(true)} onMouseLeave={() => setIsHovered(false)}>
-
+
+
);
}
@@ -81,11 +83,9 @@ function TwitterSVG() {
* @returns The GitHub SVG component.
*/
function GitHubSVG() {
- const [isHovered, setIsHovered] = useState(false);
-
return (
-
setIsHovered(true)} onMouseLeave={() => setIsHovered(false)}>
-
+
+
);
}
@@ -96,12 +96,10 @@ function GitHubSVG() {
* @returns The LinkedIn SVG component.
*/
function LinkedInSVG() {
- const [isHovered, setIsHovered] = useState(false);
-
return (
-
setIsHovered(true)} onMouseLeave={() => setIsHovered(false)}>
+
{/* Use the imported SVG icon component */}
-
+
);
}
diff --git a/utils/getStatic.ts b/utils/getStatic.ts
index 56af2cf6b1ca..2d30a29e7230 100644
--- a/utils/getStatic.ts
+++ b/utils/getStatic.ts
@@ -29,7 +29,7 @@ export const getStaticPaths = () => ({
* @returns An object containing the internationalization props.
*/
export async function getI18nProps(ctx: any, ns = ['common']) {
- const locale = ctx?.params?.lang;
+ const locale = ctx?.params?.lang ? ctx?.params?.lang : 'en';
const props = {
...(await serverSideTranslations(locale, ns))
};