Skip to content

Commit

Permalink
perf: Update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
aXenDeveloper committed Nov 10, 2023
1 parent d8aa9a3 commit 7f24311
Show file tree
Hide file tree
Showing 8 changed files with 964 additions and 968 deletions.
4 changes: 2 additions & 2 deletions app/[locale]/(main)/faq/[id]/[childId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Suspense, lazy } from 'react';
import { Metadata } from 'next';
import { getTranslator } from 'next-intl/server';
import { getTranslations } from 'next-intl/server';

import { LoadingView } from '@/views/global/loading/LoadingView';
import { faqData } from '@/views/faq/faqData';
Expand All @@ -17,7 +17,7 @@ interface Props {
export async function generateMetadata({
params: { childId, id, locale }
}: Props): Promise<Metadata> {
const t = await getTranslator(locale, 'faq');
const t = await getTranslations({ locale, namespace: 'faq' });

const isDataExist = faqData.find(data => data.id === id)?.items.find(item => item.id === childId);
if (!isDataExist) {
Expand Down
4 changes: 2 additions & 2 deletions app/[locale]/(main)/faq/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Suspense, lazy } from 'react';
import { Metadata } from 'next';
import { getTranslator } from 'next-intl/server';
import { getTranslations } from 'next-intl/server';

import { LoadingView } from '@/views/global/loading/LoadingView';
import { faqData } from '@/views/faq/faqData';
Expand All @@ -14,7 +14,7 @@ interface Props {
}

export async function generateMetadata({ params: { id, locale } }: Props): Promise<Metadata> {
const t = await getTranslator(locale, 'faq');
const t = await getTranslations({ locale, namespace: 'faq' });

const isDataExist = faqData
.map(data => data.items)
Expand Down
4 changes: 2 additions & 2 deletions app/[locale]/(main)/faq/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ReactNode } from 'react';
import { getTranslator } from 'next-intl/server';
import { getTranslations } from 'next-intl/server';
import { Metadata } from 'next';

import { WrapperFaq } from '@/views/faq/wrapper/WrapperFaq';
Expand All @@ -12,7 +12,7 @@ interface MetadataProps {
}

export async function generateMetadata({ params: { locale } }: MetadataProps): Promise<Metadata> {
const t = await getTranslator(locale, 'nav');
const t = await getTranslations({ locale, namespace: 'nav' });

return {
title: {
Expand Down
4 changes: 2 additions & 2 deletions app/[locale]/(main)/faq/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getTranslator } from 'next-intl/server';
import { getTranslations } from 'next-intl/server';
import { Suspense, lazy } from 'react';
import { notFound } from 'next/navigation';

Expand All @@ -11,7 +11,7 @@ interface Props {
}

export async function generateMetadata({ params: { locale } }: Props) {
const t = await getTranslator(locale, 'nav');
const t = await getTranslations({ locale, namespace: 'nav' });

return {
title: t('faq')
Expand Down
4 changes: 2 additions & 2 deletions app/[locale]/(main)/products/(products)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getTranslator } from 'next-intl/server';
import { getTranslations } from 'next-intl/server';

import { ProductsView } from '@/views/products/ProductsView';
import { CONFIG, ExchangeRateToUSD } from '@/config';
Expand All @@ -10,7 +10,7 @@ interface MetadataProps {
}

export async function generateMetadata({ params: { locale } }: MetadataProps) {
const t = await getTranslator(locale, 'nav');
const t = await getTranslations({ locale, namespace: 'nav' });

return {
title: t('products')
Expand Down
4 changes: 2 additions & 2 deletions app/[locale]/(main)/products/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getTranslator } from 'next-intl/server';
import { getTranslations } from 'next-intl/server';
import { notFound } from 'next/navigation';

import { ProductView } from '@/views/products/[id]/ProductView';
Expand All @@ -13,7 +13,7 @@ interface Props {
}

export async function generateMetadata({ params: { id, locale } }: Props) {
const t = await getTranslator(locale, 'nav');
const t = await getTranslations({ locale, namespace: 'nav' });

const findProduct = productsData.find(product => product.id === id);

Expand Down
Loading

1 comment on commit 7f24311

@vercel
Copy link

@vercel vercel bot commented on 7f24311 Nov 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.