From 410b363883cc8b441bc2a858825ade07d72a19ca Mon Sep 17 00:00:00 2001 From: IT Fixcomart Date: Tue, 1 Nov 2022 10:40:36 +0700 Subject: Add progress bar and performance optimization --- src/pages/shop/product/[slug].js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/pages/shop') diff --git a/src/pages/shop/product/[slug].js b/src/pages/shop/product/[slug].js index 519f8160..2ff151fa 100644 --- a/src/pages/shop/product/[slug].js +++ b/src/pages/shop/product/[slug].js @@ -1,15 +1,17 @@ import Link from "next/link"; import { useRouter } from "next/router"; import { useEffect, useState } from "react"; -import Header from "../../../components/header"; -import ProductCard from "../../../components/productCard"; +import Header from "../../../components/Header"; +import ProductCard from "../../../components/ProductCard"; import { getOdoo } from "../../../helpers/apiOdoo"; import { createSlug, getId } from "../../../helpers/slug"; import currencyFormat from "../../../helpers/currencyFormat"; import Head from "next/head"; import { Swiper, SwiperSlide } from "swiper/react"; +import { LazyLoadImage } from "react-lazy-load-image-component"; import 'swiper/css'; +import 'react-lazy-load-image-component/src/effects/blur.css'; export async function getServerSideProps(context) { @@ -78,7 +80,7 @@ export default function ProductDetail({product, similarProducts}) {
- {product.name} + {product.manufacture.name || '-'} -- cgit v1.2.3