summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2022-11-02 17:20:52 +0700
committerIT Fixcomart <it@fixcomart.co.id>2022-11-02 17:20:52 +0700
commitc1d6b160c7356f990017a36ccd84590c45e7528e (patch)
tree954bf7e55e50b1148b7e81b0c63134b230bc9122 /src
parent4e1bc974c409cc1707aae5857377c3bd20767ea3 (diff)
Set viewport
Diffstat (limited to 'src')
-rw-r--r--src/components/Header.js4
-rw-r--r--src/components/ProductCard.js2
-rw-r--r--src/pages/shop/product/[slug].js11
-rw-r--r--src/styles/globals.css2
4 files changed, 10 insertions, 9 deletions
diff --git a/src/components/Header.js b/src/components/Header.js
index 3d5d0f84..3814ed20 100644
--- a/src/components/Header.js
+++ b/src/components/Header.js
@@ -5,6 +5,7 @@ import SearchIcon from "../icons/search.svg";
import MenuIcon from "../icons/menu.svg";
import ChevronRightIcon from "../icons/chevron-right.svg";
import { useState } from "react";
+import Head from "next/head";
export default function Header() {
@@ -15,6 +16,9 @@ export default function Header() {
return (
<>
+ <Head>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
+ </Head>
<div className={isMenuActive ? 'menu-wrapper active' : 'menu-wrapper'}>
<div className="flex gap-x-2 items-center">
<Link href="/login" className="w-full py-2 btn-light">Masuk</Link>
diff --git a/src/components/ProductCard.js b/src/components/ProductCard.js
index f51473ad..250a5c7d 100644
--- a/src/components/ProductCard.js
+++ b/src/components/ProductCard.js
@@ -6,7 +6,7 @@ import { LazyLoadImage } from "react-lazy-load-image-component";
import 'react-lazy-load-image-component/src/effects/blur.css';
-export default function productCard({ data }) {
+export default function ProductCard({ data }) {
let product = data;
return (
<div className="product-card">
diff --git a/src/pages/shop/product/[slug].js b/src/pages/shop/product/[slug].js
index 10b4c322..efc0be01 100644
--- a/src/pages/shop/product/[slug].js
+++ b/src/pages/shop/product/[slug].js
@@ -1,20 +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 { 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';
-
-import ImagePlaceholderIcon from '../../../icons/image-placeholder.svg';
-
+import "swiper/css";
+import "react-lazy-load-image-component/src/effects/blur.css";
+import ImagePlaceholderIcon from "../../../icons/image-placeholder.svg";
export async function getServerSideProps(context) {
const { slug } = context.query;
diff --git a/src/styles/globals.css b/src/styles/globals.css
index 2e4ea975..0570da9d 100644
--- a/src/styles/globals.css
+++ b/src/styles/globals.css
@@ -5,7 +5,7 @@
@tailwind utilities;
html, body {
- @apply max-w-full;
+ @apply w-screen;
@apply text-base;
@apply text-gray-900;
}