From e6fd8e573f64ef6464720edb7457c9cdfcc6bfa2 Mon Sep 17 00:00:00 2001 From: vanderleik Date: Mon, 8 Apr 2024 09:31:07 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20VIN-236=20-=20excluindo=20componentes?= =?UTF-8?q?=20desneecss=C3=A1rios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.jsx | 2 - frontend/src/components/wine/SearchWine.jsx | 9 -- frontend/src/components/wine/WineReview.jsx | 71 ------------ .../components/wine/forms/SearchWineForm.jsx | 32 ------ .../components/wine/forms/WineReviewFinal.jsx | 25 ---- .../components/wine/forms/WineReviewForm.jsx | 107 ------------------ 6 files changed, 246 deletions(-) delete mode 100644 frontend/src/components/wine/SearchWine.jsx delete mode 100644 frontend/src/components/wine/WineReview.jsx delete mode 100644 frontend/src/components/wine/forms/SearchWineForm.jsx delete mode 100644 frontend/src/components/wine/forms/WineReviewFinal.jsx delete mode 100644 frontend/src/components/wine/forms/WineReviewForm.jsx diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 2a677ff0..c2cd0577 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -5,7 +5,6 @@ import { Routes, Route, } from 'react-router-dom'; import Header from './components/header/Header'; import Home from './components/home/Home'; import Wine from './components/wine/Wine'; -import WineReview from './components/wine/WineReview'; import Footer from './components/footer/Footer'; import Tasting from './components/tasting/Tasting'; import TastingCard from './components/tasting/TastingCard'; @@ -38,7 +37,6 @@ function App() { } /> } /> - } /> } /> } /> diff --git a/frontend/src/components/wine/SearchWine.jsx b/frontend/src/components/wine/SearchWine.jsx deleted file mode 100644 index 61038b9e..00000000 --- a/frontend/src/components/wine/SearchWine.jsx +++ /dev/null @@ -1,9 +0,0 @@ -const SearchWine = () => { - return ( - <> -
Nada por aqui
- - ) -} - -export default SearchWine \ No newline at end of file diff --git a/frontend/src/components/wine/WineReview.jsx b/frontend/src/components/wine/WineReview.jsx deleted file mode 100644 index 500e5d59..00000000 --- a/frontend/src/components/wine/WineReview.jsx +++ /dev/null @@ -1,71 +0,0 @@ -import { Card } from 'react-bootstrap'; -import { useState } from "react"; -import SearchWineForm from './forms/SearchWineForm'; -import WineReviewForm from './forms/WineReviewForm'; -import WineReviewFinal from './forms/WineReviewFinal'; - -const WineReview = () => { - const [step, setStep] = useState(1); - - const [formData, setFormData] = useState({ - whatTasted: '', - whenTasted: '', - whatSaw: '', - whatAromas: '', - whatFlavors: '', - whatOpinion: '', - pointScale: '' - }); - - const nextStep = () => { - setStep(step + 1); - }; - - const prevStep = () => { - setStep(step - 1); - }; - - const handleInputData = input => e => { - const { value } = e.target; - - setFormData(prevState => ({ - ...prevState, - [input]: value - })); - }; - - - switch (step) { - case 1: - return ( - - Avaliação de Vinho - - - - ); - - case 2: - return ( - - Avaliação de Vinho - - - ); - - default: - return ( -
-
- ); - } -} - -export default WineReview \ No newline at end of file diff --git a/frontend/src/components/wine/forms/SearchWineForm.jsx b/frontend/src/components/wine/forms/SearchWineForm.jsx deleted file mode 100644 index 01b69102..00000000 --- a/frontend/src/components/wine/forms/SearchWineForm.jsx +++ /dev/null @@ -1,32 +0,0 @@ -import Button from 'react-bootstrap/Button'; -import Form from 'react-bootstrap/Form'; -import Stack from 'react-bootstrap/Stack'; -import { useState } from 'react'; - -const SearchWineForm = ({ nextStep, handleFormData, values }) => { - const [error, setError] = useState(false); - - const submitFormData = (e) => { - e.preventDefault(); - nextStep(); - }; - - return ( - <> -
- - - - -
- - ) -} - -export default SearchWineForm \ No newline at end of file diff --git a/frontend/src/components/wine/forms/WineReviewFinal.jsx b/frontend/src/components/wine/forms/WineReviewFinal.jsx deleted file mode 100644 index 1d631cb0..00000000 --- a/frontend/src/components/wine/forms/WineReviewFinal.jsx +++ /dev/null @@ -1,25 +0,0 @@ -import { Card } from "react-bootstrap"; - -const WineReviewFinal = ({ values }) => { - - const { whatTasted, whenTasted, whatSaw, whatAromas, whatFlavors, whatOpinion, pointScale } = values; - - return ( - <> - - -

Vinho avaliado: {whatTasted}{" "}

-

Quando foi avaliado: {whenTasted}{" "}

-

O que viu: {whatSaw}{" "}

-

Que aromas sentiu: {whatAromas}{" "}

-

Que sabores percebeu: {whatFlavors}{" "}

-

Opinião geral: {whatOpinion}{" "}

-

Nota atribuída: {pointScale}{" "}

-
- -
- - ) -} - -export default WineReviewFinal \ No newline at end of file diff --git a/frontend/src/components/wine/forms/WineReviewForm.jsx b/frontend/src/components/wine/forms/WineReviewForm.jsx deleted file mode 100644 index 128e1354..00000000 --- a/frontend/src/components/wine/forms/WineReviewForm.jsx +++ /dev/null @@ -1,107 +0,0 @@ -import { useState } from 'react' -import { Form, Card, Button } from 'react-bootstrap'; -import Row from 'react-bootstrap/Row'; - -const WineReviewForm = ({ nextStep, handleFormData, prevStep, values }) => { - const { whatTasted } = values; - - const [error, setError] = useState(false); - - const submitFormData = (e) => { - e.preventDefault(); - nextStep(); - }; - - return ( - <> -

Vinho: {whatTasted}{" "}

-
- - - Data da avaliação - - - - - Aspectos visuais - - - - - Aromas - - - - - Sabores - - - - - Opinião geral - - - - - Pontuação - - - - - - - - - - - -
- - - -
- -
- - ) -} - -export default WineReviewForm \ No newline at end of file