Skip to content

Commit

Permalink
🐛 About page and manage user pages not translated (#1724)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnart authored Dec 7, 2023
1 parent fc38f7a commit d6af6af
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
13 changes: 9 additions & 4 deletions src/pages/manage/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import {
Stack,
Table,
Text,
createStyles
createStyles,
} from '@mantine/core';
import {
IconAnchor,
IconKey,
IconLanguage,
IconSchema,
IconVersions,
IconVocabulary
IconVocabulary,
} from '@tabler/icons-react';
import { useQuery } from '@tanstack/react-query';
import { InitOptions } from 'i18next';
Expand Down Expand Up @@ -262,7 +262,7 @@ export const Page = ({ contributors }: { contributors: Contributors[] }) => {
);
};

export async function getServerSideProps({ locale }: GetServerSidePropsContext) {
export async function getServerSideProps(ctx: GetServerSidePropsContext) {
const contributors = (await fetch(
`https://api.github.com/repos/${REPO_URL}/contributors?per_page=100`,
{
Expand All @@ -272,7 +272,12 @@ export async function getServerSideProps({ locale }: GetServerSidePropsContext)
return {
props: {
contributors,
...(await getServerSideTranslations(['layout/manage', 'manage/index'], locale)),
...(await getServerSideTranslations(
['layout/manage', 'manage/index'],
ctx.locale,
ctx.req,
ctx.res
)),
},
};
}
Expand Down
5 changes: 3 additions & 2 deletions src/pages/manage/users/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,10 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => {
const translations = await getServerSideTranslations(
manageNamespaces,
ctx.locale,
undefined,
undefined
ctx.req,
ctx.res
);

return {
props: {
...translations,
Expand Down

0 comments on commit d6af6af

Please sign in to comment.