From 5cfeb48b11f14620e4d5d659bb035dfbff8f33c8 Mon Sep 17 00:00:00 2001 From: Daniele Pancottini Date: Fri, 17 Feb 2023 21:04:46 +0100 Subject: [PATCH] Update react-img-mapper to 1.5, translate contat page --- pnpm-lock.yaml | 44 +++---------------- site/components/common/Footer/Footer.tsx | 4 +- .../HomePage/PolygonModal/PolygonModal.tsx | 2 +- site/components/common/Layout/Layout.tsx | 2 - site/package.json | 3 +- site/pages/contact.tsx | 18 +++++--- 6 files changed, 21 insertions(+), 52 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9c076e519..a69b29f42 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -651,11 +651,10 @@ importers: react-fast-marquee: ^1.3.1 react-h5-audio-player: ^3.8.6 react-icons: ^4.7.1 - react-img-mapper: ^1.4.0 + react-img-mapper: ^1.5.0 react-merge-refs: ^2.0.1 react-slick: ^0.29.0 react-use-measure: ^2.1.1 - reactjs-img-mapper: ^1.0.3 screenfull: ^6.0.2 tabbable: ^5.2.1 tailwindcss: ^3.0.13 @@ -701,11 +700,10 @@ importers: react-fast-marquee: 1.3.5_biqbaboplfbrettd7655fr4n2y react-h5-audio-player: 3.8.6_biqbaboplfbrettd7655fr4n2y react-icons: 4.7.1_react@18.2.0 - react-img-mapper: 1.4.0_biqbaboplfbrettd7655fr4n2y + react-img-mapper: 1.5.0_biqbaboplfbrettd7655fr4n2y react-merge-refs: 2.0.1 react-slick: 0.29.0_biqbaboplfbrettd7655fr4n2y react-use-measure: 2.1.1_biqbaboplfbrettd7655fr4n2y - reactjs-img-mapper: 1.0.3_biqbaboplfbrettd7655fr4n2y screenfull: 6.0.2 tabbable: 5.3.3 tailwindcss: 3.1.8_postcss@8.4.16 @@ -9689,11 +9687,11 @@ packages: react: 18.2.0 dev: false - /react-img-mapper/1.4.0_biqbaboplfbrettd7655fr4n2y: - resolution: {integrity: sha512-dP1JqD4/8rQWoaViqOwclmNeU8MVrk5sIDD6dme/m7HYDmulcNaKKHlzZrVVq7N+Z/00cTXpbBwEn+CocnDV/w==} + /react-img-mapper/1.5.0_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-t0WRxT0AKzGqS66j0zqsh/VAy6zsXI5HtGjDirZ0fjSg3IrP5Gce+XaXTEmfSJ1UuD2ye6c3zrDayUp4qOsgPw==} peerDependencies: - react: 16.x || 17.x - react-dom: 16.x || 17.x + react: 16.x || 17.x || 18.x + react-dom: 16.x || 17.x || 18.x dependencies: react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -9774,19 +9772,6 @@ packages: tslib: 2.4.0 dev: false - /react-tooltip/4.5.1_biqbaboplfbrettd7655fr4n2y: - resolution: {integrity: sha512-Zo+CSFUGXar1uV+bgXFFDe7VeS2iByeIp5rTgTcc2HqtuOS5D76QapejNNfx320MCY91TlhTQat36KGFTqgcvw==} - engines: {npm: '>=6.13'} - peerDependencies: - react: '>=16.0.0' - react-dom: '>=16.0.0' - dependencies: - prop-types: 15.8.1 - react: 18.2.0 - react-dom: 18.2.0_react@18.2.0 - uuid: 7.0.3 - dev: false - /react-use-measure/2.1.1_biqbaboplfbrettd7655fr4n2y: resolution: {integrity: sha512-nocZhN26cproIiIduswYpV5y5lQpSQS1y/4KuvUCjSKmw7ZWIS/+g3aFnX3WdBkyuGUtTLif3UTqnLLhbDoQig==} peerDependencies: @@ -9813,18 +9798,6 @@ packages: dependencies: loose-envify: 1.4.0 - /reactjs-img-mapper/1.0.3_biqbaboplfbrettd7655fr4n2y: - resolution: {integrity: sha512-oeYKMH02BjGfoN8x91VeHnYOgrVIpWeNeRh0njHP/1NXl11nTyuHTwVCB9kykrcOUekt+lktUlkIRCKwMYAXRA==} - peerDependencies: - react: 16.x || 17.x || 18.x - react-dom: 16.x || 17.x || 18.x - dependencies: - react: 18.2.0 - react-dom: 18.2.0_react@18.2.0 - react-fast-compare: 3.2.0 - react-tooltip: 4.5.1_biqbaboplfbrettd7655fr4n2y - dev: false - /read-cache/1.0.0: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} dependencies: @@ -11246,11 +11219,6 @@ packages: lodash.isplainobject: 4.0.6 dev: false - /uuid/7.0.3: - resolution: {integrity: sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==} - hasBin: true - dev: false - /uuid/8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true diff --git a/site/components/common/Footer/Footer.tsx b/site/components/common/Footer/Footer.tsx index 2cfd7976b..684df4d60 100644 --- a/site/components/common/Footer/Footer.tsx +++ b/site/components/common/Footer/Footer.tsx @@ -44,7 +44,7 @@ const Footer: FC = ({ className, pages }) => { -
+
{[...links].map((page: FooterLink) => ( @@ -66,7 +66,7 @@ const Footer: FC = ({ className, pages }) => { ))}
-
+
diff --git a/site/components/common/HomePage/PolygonModal/PolygonModal.tsx b/site/components/common/HomePage/PolygonModal/PolygonModal.tsx index 30979a165..78cfe8c10 100644 --- a/site/components/common/HomePage/PolygonModal/PolygonModal.tsx +++ b/site/components/common/HomePage/PolygonModal/PolygonModal.tsx @@ -9,7 +9,7 @@ import { import decadesManifest from '../../../../static_data/decadesManifest.json' import { useRouter } from 'next/router' import { useEffect, useRef, useState } from 'react' -import ImageMapper from 'reactjs-img-mapper' +import ImageMapper from 'react-img-mapper' import Image from 'next/image' export default function MarkerCardModal(props: { diff --git a/site/components/common/Layout/Layout.tsx b/site/components/common/Layout/Layout.tsx index 06009d8da..46582c2aa 100644 --- a/site/components/common/Layout/Layout.tsx +++ b/site/components/common/Layout/Layout.tsx @@ -114,8 +114,6 @@ const Layout: React.FC = ({ const { locale = 'it', pathname } = useRouter() const navBarlinks = navBarLinks[locale as keyof typeof navBarLinks] - console.log(pathname) - return (
diff --git a/site/package.json b/site/package.json index 90f35ee08..55d14e8cb 100644 --- a/site/package.json +++ b/site/package.json @@ -52,11 +52,10 @@ "react-fast-marquee": "^1.3.1", "react-h5-audio-player": "^3.8.6", "react-icons": "^4.7.1", - "react-img-mapper": "^1.4.0", + "react-img-mapper": "^1.5.0", "react-merge-refs": "^2.0.1", "react-slick": "^0.29.0", "react-use-measure": "^2.1.1", - "reactjs-img-mapper": "^1.0.3", "screenfull": "^6.0.2", "tabbable": "^5.2.1", "tailwindcss": "^3.0.13", diff --git a/site/pages/contact.tsx b/site/pages/contact.tsx index 0f40d8676..d7fb99d9a 100644 --- a/site/pages/contact.tsx +++ b/site/pages/contact.tsx @@ -1,31 +1,35 @@ import { AtSignIcon, PhoneIcon } from '@chakra-ui/icons' -import { Box, Heading, Stack, Text } from '@chakra-ui/react' +import { Box, Heading, SimpleGrid, Stack, Text } from '@chakra-ui/react' import { Layout } from '@components/common' import { Text as TextUI } from '@components/ui' +import { useRouter } from 'next/router' export default function Contact() { + + const { locale } = useRouter() + return (
- Contatti + {locale == "it" ? "Contatti" : "Contact Us"} - Puoi contattarci usando i recapiti che trovi qui sotto! + {locale == "it" ? "Puoi contattarci usando i recapiti che trovi qui sotto!" : "You can contact us using the contact details below!"} - - + + safaraecommerce@protonmail.com - + +39 3923790948 - +
) }