Skip to content

Commit

Permalink
feat: change to async, use getTranslations intead of useTranslations
Browse files Browse the repository at this point in the history
  • Loading branch information
supattrw committed Nov 10, 2024
1 parent af11061 commit 1269968
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/app/[locale]/(default)/about/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { unstable_setRequestLocale } from 'next-intl/server';
import { getTranslations } from 'next-intl/server';
import React from 'react';
import { Card, CardContent, CardHeader } from 'src/components/ui/Card';
import { useTranslations } from 'next-intl';
import { Printer, Gamepad2, SquareUserRound } from 'lucide-react';
import { Meteors } from '@/components/ui/Meteor';
import { FAQAccordion } from '@/components/about/FAQAccordion';
Expand All @@ -13,9 +12,9 @@ export default async function AboutPage({
}: {
params: Promise<{ locale: string }>;
}) {
unstable_setRequestLocale(locale);
const t = useTranslations('about');
const tFAQ = useTranslations('about.FAQ')
const { locale } = await params;
const t = await getTranslations('about');
const tFAQ = await getTranslations('about.FAQ')

const cardData = [
{ id: 1, title: t('leaderboard.title'), content: t('leaderboard.about'), link: `/${locale}/about/leaderboard`},
Expand Down

0 comments on commit 1269968

Please sign in to comment.