diff --git a/app/[locale]/[...slug]/page.tsx b/app/[locale]/[...slug]/page.tsx index ff0786b1e..9de1f216b 100644 --- a/app/[locale]/[...slug]/page.tsx +++ b/app/[locale]/[...slug]/page.tsx @@ -22,7 +22,7 @@ export async function generateMetadata({ if (!page) return notFound(); return { - title: page.seo?.title || page.title, + title: `${page.seo?.title || page.title}`, description: page.seo?.description || page.bodySummary, openGraph: { publishedTime: page.createdAt, diff --git a/components/modules/slider/slider.tsx b/components/modules/slider/slider.tsx index 856380160..7c0194d6a 100644 --- a/components/modules/slider/slider.tsx +++ b/components/modules/slider/slider.tsx @@ -5,7 +5,7 @@ import { useEffect, useState } from 'react'; import CategoryCard from '@/components/ui/category-card/category-card'; import ProductCard from '@/components/ui/product-card/product-card'; -import { Carousel, CarouselItem } from 'components/modules/carousel/carousel'; +import { Carousel, CarouselItem } from '@/components/modules/carousel/carousel'; interface SliderProps { products: [] | any; diff --git a/components/ui/locale-switcher/locale-switcher.tsx b/components/ui/locale-switcher/locale-switcher.tsx index e9c826b83..697117a8d 100644 --- a/components/ui/locale-switcher/locale-switcher.tsx +++ b/components/ui/locale-switcher/locale-switcher.tsx @@ -9,7 +9,7 @@ import { import { LanguageIcon } from '@heroicons/react/24/outline'; import { useLocale, useTranslations } from 'next-intl'; import Link from 'next-intl/link'; -import { usePathname } from 'next/navigation'; +// import { usePathname } from 'next/navigation'; import { useState } from 'react'; import { supportedLanguages } from '../../../i18n-config'; @@ -22,29 +22,29 @@ import { supportedLanguages } from '../../../i18n-config'; // } export default function LocaleSwitcher() { - const pathName = usePathname(); + // const pathName = usePathname(); const currentLocale = useLocale(); const t = useTranslations('ui'); // const translations = localeData.translations; - const redirectedPathName = (locale: string) => { - if (!pathName) return '/'; + // const redirectedPathName = (locale: string) => { + // if (!pathName) return '/'; - // if (translations.length > 0) { - // const translation = translations.find((obj) => { - // return obj['locale'] === locale; - // }); + // if (translations.length > 0) { + // const translation = translations.find((obj) => { + // return obj['locale'] === locale; + // }); - // if (translation) { - // const url = `/${translation['locale']}${translation['slug']}`; + // if (translation) { + // const url = `/${translation['locale']}${translation['slug']}`; - // return url; - // } - // } + // return url; + // } + // } - return `/${locale}`; - }; + // return `/${locale}`; + // }; const [isOpen, setIsOpen] = useState(false); @@ -67,7 +67,7 @@ export default function LocaleSwitcher() { className={`flex w-full cursor-pointer items-center px-4 py-2 text-sm ${ currentLocale == locale.id && 'font-bold' }`} - href={redirectedPathName(locale.id)} + href={'/'} > {locale.title}