Links and data fetching for dynamic routes

This commit is contained in:
Henrik Larsson
2023-08-13 22:16:15 +02:00
parent 3c19fb7a79
commit ce9c62084e
18 changed files with 46 additions and 55 deletions

View File

@@ -2,7 +2,7 @@
import SanityImage from 'components/ui/sanity-image';
import { cn } from 'lib/utils';
import Link from 'next/link';
import Link from 'next-intl/link';
import { FC } from 'react';
interface CardProps {

View File

@@ -1,6 +1,6 @@
import SanityImage from 'components/ui/sanity-image';
import { cn } from 'lib/utils';
import Link from 'next/link';
import Link from 'next-intl/link';
import { FC } from 'react';
interface Props {
className?: string;

View File

@@ -8,7 +8,7 @@ import {
} from '@/components/ui/dropdown-menu';
import { LanguageIcon } from '@heroicons/react/24/outline';
import { useLocale, useTranslations } from 'next-intl';
import Link from 'next/link';
import Link from 'next-intl/link';
import { usePathname } from 'next/navigation';
import { useState } from 'react';
import { supportedLanguages } from '../../../i18n-config';

View File

@@ -5,7 +5,7 @@ import type { Product } from '@/lib/storm/product';
import Price from 'components/price';
import Text from 'components/ui/text';
import { cn } from 'lib/utils';
import Link from 'next/link';
import Link from 'next-intl/link';
import { FC } from 'react';
interface Props {
className?: string;