Skip to content
2 changes: 1 addition & 1 deletion i18n.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@
"validISO639_1": true
},
{
"code": "se",
"code": "sv",
"crowdinCode": "sv-SE",
"name": "Swedish",
"localName": "Svenska",
Expand Down
11 changes: 3 additions & 8 deletions src/components/Banners/FusakaBanner/FusakaCountdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useEffect, useState } from "react"
import humanizeDuration from "humanize-duration"
import { useLocale, useTranslations } from "next-intl"
import { useLocale } from "next-intl"

const fusakaDate = new Date("2025-12-03T21:49:11.000Z")
const fusakaDateTime = fusakaDate.getTime()
Expand Down Expand Up @@ -108,9 +108,8 @@ const getTimeLabels = (locale: string): TimeLabels => {
}
}

const FusakaCountdown = () => {
const FusakaCountdown = ({ liveNowText }: { liveNowText: string }) => {
const locale = useLocale()
const t = useTranslations("page-index")
const [timeUnits, setTimeUnits] = useState<TimeUnits>(() => getTimeUnits())
const [labels, setLabels] = useState<TimeLabels>(() => getTimeLabels(locale))

Expand All @@ -129,11 +128,7 @@ const FusakaCountdown = () => {
}, [])

if (timeUnits.isExpired) {
return (
<p className="text-2xl font-extrabold text-white">
{t("page-index-fusaka-live-now")}
</p>
)
return <p className="text-2xl font-extrabold text-white">{liveNowText}</p>
}

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Banners/FusakaBanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const FusakaBanner = async () => {
br: () => <br className="md:hidden" />,
})}
</p>
<FusakaCountdown />
<FusakaCountdown liveNowText={t("page-index-fusaka-live-now")} />
</div>
</div>
</LinkBox>
Expand Down
1 change: 1 addition & 0 deletions src/i18n/routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const routing = defineRouting({
locales: LOCALES_CODES,
defaultLocale: DEFAULT_LOCALE,
localePrefix: "as-needed",
alternateLinks: false,
})

// Lightweight wrappers around Next.js' navigation APIs
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions src/lib/md/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const getMdMetadata = async ({
}) => {
const slug = slugArray.join("/")

const { markdown, isTranslated } = await importMd(locale, slug)
const { markdown } = await importMd(locale, slug)
const { frontmatter } = await compile({
markdown,
slugArray: slug.split("/"),
Expand All @@ -35,7 +35,6 @@ export const getMdMetadata = async ({
description,
image,
author,
noIndex: !isTranslated,
})
return metadata
}
7 changes: 1 addition & 6 deletions src/lib/utils/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { getTranslations } from "next-intl/server"

import { DEFAULT_OG_IMAGE, SITE_URL } from "@/lib/constants"

import { isPageTranslated } from "../i18n/pageTranslation"

import { isLocaleValidISO639_1 } from "./translations"
import { getFullUrl } from "./url"

Expand Down Expand Up @@ -119,8 +117,5 @@ export const getMetadata = async ({
return { ...base, robots: { index: false } }
}

const isTranslated = await isPageTranslated(locale, slugString)

// If the page is not translated, do not index the page
return isTranslated ? base : { ...base, robots: { index: false } }
return base
}
Loading