Loading components/marketplace/service-specification-card.tsx +3 −2 Changes for components/marketplace/service-specification-card.tsx: 3 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ import { addCartItem } from '@/services/cart-api'; import { ServiceSpecification } from '@/services/tmf633'; import { Button, Image, Tooltip } from '@nextui-org/react'; // import { revalidatePath } from 'next/cache'; import { useSearchParams } from 'next/navigation'; import { useSearchParams, useRouter } from 'next/navigation'; import React from 'react'; import { FaCartPlus } from 'react-icons/fa'; import ServiceInfoComponent from './service-info-component'; Loading @@ -23,7 +23,7 @@ export function ServiceSpecificationCard({ const params = new URLSearchParams(searchParams?.toString() || ''); params.set('specId', serviceSpecification?.id || ''); const targetUrl = `/marketplace?${params.toString()}`; const router = useRouter(); return ( <div className="group/item relative w-full max-w-[384px] justify-center"> <Link Loading Loading @@ -89,6 +89,7 @@ export function ServiceSpecificationCard({ e.preventDefault(); e.stopPropagation(); await addCartItem(userId, serviceSpecification); router.refresh(); }} startContent={<FaCartPlus size="1.125rem" />} ></Button> Loading Loading
components/marketplace/service-specification-card.tsx +3 −2 Changes for components/marketplace/service-specification-card.tsx: 3 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ import { addCartItem } from '@/services/cart-api'; import { ServiceSpecification } from '@/services/tmf633'; import { Button, Image, Tooltip } from '@nextui-org/react'; // import { revalidatePath } from 'next/cache'; import { useSearchParams } from 'next/navigation'; import { useSearchParams, useRouter } from 'next/navigation'; import React from 'react'; import { FaCartPlus } from 'react-icons/fa'; import ServiceInfoComponent from './service-info-component'; Loading @@ -23,7 +23,7 @@ export function ServiceSpecificationCard({ const params = new URLSearchParams(searchParams?.toString() || ''); params.set('specId', serviceSpecification?.id || ''); const targetUrl = `/marketplace?${params.toString()}`; const router = useRouter(); return ( <div className="group/item relative w-full max-w-[384px] justify-center"> <Link Loading Loading @@ -89,6 +89,7 @@ export function ServiceSpecificationCard({ e.preventDefault(); e.stopPropagation(); await addCartItem(userId, serviceSpecification); router.refresh(); }} startContent={<FaCartPlus size="1.125rem" />} ></Button> Loading