From 35a967136dbf59f7f48a2b03ee7e87b3b691824c Mon Sep 17 00:00:00 2001 From: Renata Caetano Date: Fri, 11 Dec 2020 15:12:25 -0300 Subject: [PATCH] styledFeed&Card --- src/Components/Home/FeedCard.js | 42 +++++++++++++++---- .../RestaurantCard/RestaurantCard.js | 6 +-- src/Screens/Home/FeedPage.js | 19 +++++++-- src/Screens/Restaurants/RestaurantPage.js | 4 +- src/Screens/ScreenStyled.js | 17 ++++---- 5 files changed, 63 insertions(+), 25 deletions(-) diff --git a/src/Components/Home/FeedCard.js b/src/Components/Home/FeedCard.js index a49f36c..63141b2 100644 --- a/src/Components/Home/FeedCard.js +++ b/src/Components/Home/FeedCard.js @@ -7,6 +7,27 @@ import search from "../../Assets/search.svg"; import { BaseUrl } from "../../Constants/BaseUrl"; import { useRequestData } from "../../Hooks/UseRequestData"; import { goToRestaurantsDetailsPage } from '../../Routes/Cordinator' +import styled from 'styled-components' + +const Rectangle =styled.div` +display: flex; +flex-direction: column; +align-items: center; +border-radius: 8px; +border: solid 1px #b8b8b8; +margin:10px; +p{ + padding:10px; + text-align:justify; +} +` +const Img=styled.img` +width:130px; +height:120px; +` +const AreaInfo=styled.div` +display:flex; +` export default function FeedCard(props) { const restaurants = useRequestData(`${BaseUrl}/restaurants`, []); @@ -17,14 +38,17 @@ export default function FeedCard(props) { console.log (props.id) return ( - - goToRestaurantsDetailsPage(history, props.id)}> - {/*
- */} - {props.category} - - {props.description} - {props.name} {props.deliveryTime} - min Frete R$ {props.shipping} - + + goToRestaurantsDetailsPage(history, props.id)}> +

{props.category}

+ +

{props.description}

+ +

{props.name}

+

{props.deliveryTime} - min

+

Frete R$ {props.shipping}

+
+
+ ); } diff --git a/src/Components/RestaurantCard/RestaurantCard.js b/src/Components/RestaurantCard/RestaurantCard.js index 5b2e771..f617073 100644 --- a/src/Components/RestaurantCard/RestaurantCard.js +++ b/src/Components/RestaurantCard/RestaurantCard.js @@ -10,7 +10,7 @@ function RestaurantCard(props) { return ( - +
@@ -22,7 +22,7 @@ function RestaurantCard(props) { - +
) } -export default Regit adstaurantCard \ No newline at end of file +export default RestaurantCard \ No newline at end of file diff --git a/src/Screens/Home/FeedPage.js b/src/Screens/Home/FeedPage.js index 72f929c..4a3a077 100644 --- a/src/Screens/Home/FeedPage.js +++ b/src/Screens/Home/FeedPage.js @@ -4,17 +4,26 @@ import { useRequestData } from "../../Hooks/UseRequestData"; import FeedCard from "../../Components/Home/FeedCard"; import { goToRestaurantsDetailsPage } from '../../Routes/Cordinator' import { useHistory } from 'react-router-dom' +import * as S from '../../Screens/ScreenStyled' + +import Header from '../../Components/Header/Header' +import { goToLoginPage } from '../../Routes/Cordinator' +import ChevronLeftIcon from "@material-ui/icons/ChevronLeft"; export default function FeedPage(props) { const restaurants = useRequestData(`${BaseUrl}/restaurants`, []); const history = useHistory() console.log (props.id) return ( -
- + +
+ goToLoginPage(history)}/> + {restaurants.map((restaurant) => { return ( + + /> + ); })} -
+ + ); } diff --git a/src/Screens/Restaurants/RestaurantPage.js b/src/Screens/Restaurants/RestaurantPage.js index d727349..45d054a 100644 --- a/src/Screens/Restaurants/RestaurantPage.js +++ b/src/Screens/Restaurants/RestaurantPage.js @@ -48,7 +48,9 @@ function Restaurant(props) {
{restaurantDetails && restaurantDetails.restaurant && restaurantDetails.map((Item)=>{})} - + + + {restaurantDetails.name} {restaurantDetails.category} diff --git a/src/Screens/ScreenStyled.js b/src/Screens/ScreenStyled.js index 3db19f2..64a316f 100644 --- a/src/Screens/ScreenStyled.js +++ b/src/Screens/ScreenStyled.js @@ -184,15 +184,16 @@ export const title = styled.div` margin: 20px 92px 0 54px; padding: 13px 45.5px 12px; `; +export const AreaLogoRest = styled.div` +display:flex; +align-items:center; +margin-left:105px; +`; + +export const image = styled.img` + width: 150px; + height: 150px; -export const image = styled.div` - width: 328px; - height: 120px; - margin: 17px 16px 12px; - object-fit: contain; - display: flex; - flex-direction: column; - align-items: center; `; export const RestaurantTitle = styled.div` width: 328px;