From c1e60f1e5def49e0fa166609e14e029af47d9472 Mon Sep 17 00:00:00 2001 From: Guilherme Freire Date: Mon, 17 Jul 2023 21:02:05 -0300 Subject: [PATCH 1/3] :construction: Feat: ajuste no layout geral --- public/index.html | 2 +- src/components/layout/Catalog/CardV.jsx | 16 +++--- src/components/layout/Footer/Footer.jsx | 8 +-- src/components/layout/Game/Classification.jsx | 2 +- src/components/layout/Game/Media.jsx | 11 ++-- src/components/layout/Game/Specs.jsx | 4 +- src/components/layout/Homepage/Carousel.jsx | 2 +- .../layout/Homepage/PopularGames.jsx | 13 +++-- src/components/layout/Homepage/Promotions.jsx | 19 +++++-- .../layout/NavPage/ListGamesFromGenre.jsx | 51 ++++++++++++------- src/components/layout/Navbar/Navbar.jsx | 21 +++----- src/components/view/Game.jsx | 49 ++++++++++-------- src/components/view/Home.jsx | 2 +- src/components/view/Navegar.jsx | 4 +- 14 files changed, 118 insertions(+), 86 deletions(-) diff --git a/public/index.html b/public/index.html index aa069f2..d53d0e8 100644 --- a/public/index.html +++ b/public/index.html @@ -24,7 +24,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - React App + Game Store diff --git a/src/components/layout/Catalog/CardV.jsx b/src/components/layout/Catalog/CardV.jsx index e9782c3..90c34ac 100644 --- a/src/components/layout/Catalog/CardV.jsx +++ b/src/components/layout/Catalog/CardV.jsx @@ -8,8 +8,8 @@ function CardV({game}) { game && (
-
+
{ game.attributes.name }
{ game.attributes.edition && ( { game.attributes.edition } ) } @@ -30,11 +30,15 @@ function CardV({game}) { mt-1" >
-

{ utils.getMonetaryFormat(game.attributes.last_price) }

+ { + game.attributes.last_price && ( +

{ utils.getMonetaryFormat(game.attributes.last_price) }

+ ) + }

{ utils.getMonetaryFormat(game.attributes.current_price) }

{ - utils.getDiscount(game.attributes.current_price, game.attributes.last_price) && ( + utils.getDiscount(game.attributes.current_price, game.attributes.last_price) > 0 && (

Siga nossas redes

- - - + + +
diff --git a/src/components/layout/Game/Classification.jsx b/src/components/layout/Game/Classification.jsx index d5e9de5..63ec653 100644 --- a/src/components/layout/Game/Classification.jsx +++ b/src/components/layout/Game/Classification.jsx @@ -37,7 +37,7 @@ function Classification({classification}) { } return ( - +

Classificação Indicativa:

{ classification !== 1 ? classification : "L"}

diff --git a/src/components/layout/Game/Media.jsx b/src/components/layout/Game/Media.jsx index abb3fd5..fef23f4 100644 --- a/src/components/layout/Game/Media.jsx +++ b/src/components/layout/Game/Media.jsx @@ -1,4 +1,5 @@ import { useState } from "react"; +import { IoChevronBack, IoChevronForward } from "react-icons/io5"; function Media({medias}) { @@ -25,10 +26,7 @@ function Media({medias}) { bg-stone-900 bg-opacity-80 -mr-14 w-10 h-10 rounded-full hover:bg-stone-800 hover:bg-opacity-80 duration-300"> - - - - + { medias.data.map(function (media, id = 0) { @@ -43,10 +41,7 @@ function Media({medias}) { bg-stone-900 bg-opacity-80 -m-14 w-10 h-10 rounded-full hover:bg-stone-800 hover:bg-opacity-80 duration-300"> - - - - +
diff --git a/src/components/layout/Game/Specs.jsx b/src/components/layout/Game/Specs.jsx index a3831d2..0a6f468 100644 --- a/src/components/layout/Game/Specs.jsx +++ b/src/components/layout/Game/Specs.jsx @@ -1,9 +1,9 @@ -function Specs({specs}) { +function Specs({specs, nvl}) { return (
-
Requisitos mínimos:
+
{ `Requisitos ${nvl}:`}