@@ -12,13 +12,16 @@ import {
12
12
UnorderedList ,
13
13
} from "@chakra-ui/react"
14
14
15
+ import { BasePageProps } from "@/lib/types"
16
+
15
17
import Breadcrumbs from "@/components/Breadcrumbs"
16
18
import FeedbackCard from "@/components/FeedbackCard"
17
19
import InlineLink from "@/components/Link"
18
20
import OldHeading from "@/components/OldHeading"
19
21
import Text from "@/components/OldText"
20
22
import PageMetadata from "@/components/PageMetadata"
21
23
24
+ import { existsNamespace } from "@/lib/utils/existsNamespace"
22
25
import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
23
26
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
24
27
@@ -28,21 +31,23 @@ type Props = SSRConfig & {
28
31
lastDeployDate : string
29
32
}
30
33
31
- export const getStaticProps = ( async ( context ) => {
32
- const { locale } = context
33
- // load i18n required namespaces for the given page
34
+ export const getStaticProps = ( async ( { locale } ) => {
35
+ const lastDeployDate = getLastDeployDate ( )
36
+
34
37
const requiredNamespaces = getRequiredNamespacesForPage (
35
38
"/contributing/translation-program/contributors"
36
39
)
37
- const lastDeployDate = getLastDeployDate ( )
40
+
41
+ const contentNotTranslated = ! existsNamespace ( locale ! , requiredNamespaces [ 1 ] )
38
42
39
43
return {
40
44
props : {
41
45
...( await serverSideTranslations ( locale ! , requiredNamespaces ) ) ,
46
+ contentNotTranslated,
42
47
lastDeployDate,
43
48
} ,
44
49
}
45
- } ) satisfies GetStaticProps < Props >
50
+ } ) satisfies GetStaticProps < BasePageProps >
46
51
47
52
const Content = ( props : BoxProps ) => < Box py = { 4 } px = { 10 } w = "full" { ...props } />
48
53
const ContentHeading = ( props : HeadingProps ) => (
0 commit comments