From 551a5df246b8d73f784c48723a739e3ec20e94f9 Mon Sep 17 00:00:00 2001 From: Thom9521 Date: Wed, 18 Dec 2019 12:59:20 +0100 Subject: [PATCH] =?UTF-8?q?=C3=86ndret=20billede-placeholders=20til=20imag?= =?UTF-8?q?ePath?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/scooters/ScooterCards.js | 10 +++++----- src/components/showScooter/ShowScooter.js | 7 ++++--- src/components/showSubCategory/ShowSubCategory.js | 8 +++++--- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/components/scooters/ScooterCards.js b/src/components/scooters/ScooterCards.js index ab8a50c..f8160f6 100644 --- a/src/components/scooters/ScooterCards.js +++ b/src/components/scooters/ScooterCards.js @@ -2,7 +2,6 @@ import React from 'react'; import { Link } from 'react-router-dom'; import { useQuery } from '@apollo/react-hooks'; import { gql } from 'apollo-boost'; -import dummyImgScooter from '../../assets/images/dummyImgScooter.png'; import GetCategoryById from '../categories/GetCategoryById'; // Importér Reactstrap komponenter @@ -31,6 +30,7 @@ function ScooterCards() { price priceVAT categoryId + imagePath } } `; @@ -47,10 +47,10 @@ function ScooterCards() { _id, itemNo, name, - description, price, priceVAT, - categoryId + categoryId, + imagePath } = scooter; // Destructuring return ( diff --git a/src/components/showScooter/ShowScooter.js b/src/components/showScooter/ShowScooter.js index 29f92e7..53e183e 100644 --- a/src/components/showScooter/ShowScooter.js +++ b/src/components/showScooter/ShowScooter.js @@ -3,7 +3,6 @@ import GetCategoryById from '../categories/GetCategoryById'; import { useParams } from 'react-router'; import { useQuery } from '@apollo/react-hooks'; import { gql } from 'apollo-boost'; -import dummyImgScooter from '../../assets/images/dummyImgScooter.png'; import './ShowScooter.css'; // Importér Reactstrap komponenter @@ -26,6 +25,7 @@ function ShowScooter() { description itemNo categoryId + imagePath } } `; @@ -46,6 +46,7 @@ function ShowScooter() { const scoDescription = data.getScooterById.description; const scoItemNo = data.getScooterById.itemNo; const scoCategoryId = data.getScooterById.categoryId; + const scoImagePath = data.getScooterById.imagePath; // Løber gennem alle tags og udskriver hvert enkelt som et list item const tagCloudItems = scoTagsArray.map(tag => ( @@ -61,8 +62,8 @@ function ShowScooter() { {scoName} diff --git a/src/components/showSubCategory/ShowSubCategory.js b/src/components/showSubCategory/ShowSubCategory.js index 387839e..50a9557 100644 --- a/src/components/showSubCategory/ShowSubCategory.js +++ b/src/components/showSubCategory/ShowSubCategory.js @@ -4,7 +4,6 @@ import { useParams } from 'react-router'; import { useQuery } from '@apollo/react-hooks'; import { gql } from 'apollo-boost'; import './ShowSubCategory.css'; -import dummyImgDrawing from '../../assets/images/dummyImgDrawing.jpg'; // Importér Reactstrap komponenter import { Container, Row, CardDeck } from 'reactstrap'; @@ -35,9 +34,12 @@ function ShowSubCategory() {

{data.getSubCategoryById.name}

Splittegning

Reservedele