From ee57b132f9c912e33d4b8b7b231e0386b758b8bd Mon Sep 17 00:00:00 2001 From: devartes Date: Wed, 18 Jan 2023 15:31:42 -0300 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20adicionando=20conte=C3=BAdo=20do=20?= =?UTF-8?q?v=C3=ADdeo=207.0=20at=C3=A9=207.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom/react/Countdown.tsx | 3 + custom/react/Menu.tsx | 11 ++++ custom/react/components/Countdown/index.tsx | 56 ++++++++++++++++++ custom/store/interfaces.json | 6 ++ storefront/store/blocks/pages/home/home.jsonc | 59 +++++++++++++++++++ .../sass/pages/home/vtex.flex-layout.scss | 25 ++++++++ .../sass/pages/home/vtex.rich-text.scss | 33 +++++++++++ .../sass/pages/home/vtex.store-link.scss | 11 ++++ yarn.lock | 24 ++------ 9 files changed, 209 insertions(+), 19 deletions(-) create mode 100644 custom/react/Countdown.tsx create mode 100644 custom/react/Menu.tsx create mode 100644 custom/react/components/Countdown/index.tsx create mode 100644 storefront/styles/sass/pages/home/vtex.flex-layout.scss create mode 100644 storefront/styles/sass/pages/home/vtex.rich-text.scss create mode 100644 storefront/styles/sass/pages/home/vtex.store-link.scss diff --git a/custom/react/Countdown.tsx b/custom/react/Countdown.tsx new file mode 100644 index 0000000..89c881e --- /dev/null +++ b/custom/react/Countdown.tsx @@ -0,0 +1,3 @@ +import Countdown from "./components/Countdown"; + +export default Countdown; diff --git a/custom/react/Menu.tsx b/custom/react/Menu.tsx new file mode 100644 index 0000000..7772223 --- /dev/null +++ b/custom/react/Menu.tsx @@ -0,0 +1,11 @@ +import React from "react"; + +const Menu = () => { + return ( +
+

Menu

+
+ ); +}; + +export default Menu; diff --git a/custom/react/components/Countdown/index.tsx b/custom/react/components/Countdown/index.tsx new file mode 100644 index 0000000..b67bc19 --- /dev/null +++ b/custom/react/components/Countdown/index.tsx @@ -0,0 +1,56 @@ +import React, { useState, useEffect } from "react"; + +interface CountdownProps { + //formato: dd/mm/yyyy/hh:mm + endDate: string; +} + +interface Time { + hour: number; + minute: number; + second: number; +} + +const Countdown = ({ endDate }: CountdownProps) => { + const [time, setTime] = useState