Skip to content

Commit 40ddade

Browse files
committed
Fix i18n initialization and build errors
1 parent fbdc805 commit 40ddade

12 files changed

Lines changed: 23 additions & 17 deletions

File tree

lib/i18n.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ i18n.use(initReactI18next).init({
4545
},
4646
lng: "it",
4747
fallbackLng: "it",
48+
ns: ["common", "rules", "services", "search", "degree", "about", "notFound"],
49+
defaultNS: "common",
4850
interpolation: { escapeValue: false },
4951
})
5052

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "studentiunimi",
3-
"version": "0.1.0",
3+
"version": "1.0.0",
44
"private": true,
55
"scripts": {
66
"dev": "run-p web proxy",

pages/about/index.tsx

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import TeamMemberCard from "./partials/member-card"
88
import { cdaMembers, founders } from "@/data/staff"
99
import ItemList from "@/components/item-list"
1010
import ContactMailPopup from "./partials/contact-popup"
11-
import { NextSeo } from "next-seo"
1211
import Seo from "@/components/seo"
1312

1413
interface AboutPageProps {
@@ -35,20 +34,24 @@ const AboutPage = ({ founders, cdaMembers }: AboutPageProps) => {
3534
</Text>
3635
</VStack>
3736

38-
<ItemList
39-
items={founders}
40-
label={t("founders")}
41-
getItemName={(founder) => founder.name}
42-
renderItem={(founder) => <TeamMemberCard key={founder.user_id} member={founder} />}
43-
/>
37+
{founders && (
38+
<ItemList
39+
items={founders}
40+
label={t("founders")}
41+
getItemName={(founder) => founder.name}
42+
renderItem={(founder) => <TeamMemberCard key={founder.user_id} member={founder} />}
43+
/>
44+
)}
4445

45-
<ItemList
46-
items={cdaMembers}
47-
label={t("board")}
48-
customLabelWidth={{ maxWidth: "auto" }}
49-
getItemName={(member) => member.name}
50-
renderItem={(member) => <TeamMemberCard key={member.user_id} member={member} />}
51-
/>
46+
{cdaMembers && (
47+
<ItemList
48+
items={cdaMembers}
49+
label={t("board")}
50+
customLabelWidth={{ maxWidth: "auto" }}
51+
getItemName={(member) => member.name}
52+
renderItem={(member) => <TeamMemberCard key={member.user_id} member={member} />}
53+
/>
54+
)}
5255
</Box>
5356

5457
<ContactMailPopup />

pages/about/partials/member-card/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ const TeamMemberCard: React.FC<{ member: TeamMember }> = ({ member }) => {
99
const bg = useColorModeValue("gray.50", "gray.700")
1010
const hoverBg = useColorModeValue("gray.100", "gray.600")
1111

12+
if (!member) return null
13+
1214
const normalizedUsername = member.username.startsWith("@") ? member.username.slice(1) : member.username
1315
const href = member.href ?? `https://t.me/${normalizedUsername}`
1416

pages/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ import { serverSideTranslations } from "next-i18next/serverSideTranslations"
77
import { ExtraGroup } from "@/types/api"
88
import { getExtraGroups } from "@/lib/api/groups"
99
import { useCustomRouter } from "@/hooks/router"
10-
import InfoCards from "./index/partials/info-cards"
10+
import InfoCards from "../components/info-cards"
1111
import PrivacyButton from "@/components/privacy/button"
1212
import GroupCard from "@/components/group-card"
1313
import ItemList from "@/components/item-list"
14-
import { NextSeo } from "next-seo"
1514
import Seo from "@/components/seo"
1615

1716
interface HomepageProps {

public/images/seo/404.png

1020 KB
Loading

public/images/seo/about.png

1.05 MB
Loading

public/images/seo/degrees.png

1.11 MB
Loading

public/images/seo/rules.png

1.15 MB
Loading

0 commit comments

Comments
 (0)