Browse Source

random fixes

master
Niko Hakala 4 years ago
parent
commit
33d9fc9a53
6 changed files with 11 additions and 33 deletions
  1. +0
    -1
      README.md
  2. +0
    -1
      package.json
  3. +7
    -1
      src/App.css
  4. +0
    -24
      src/Components/Fetchjson.js
  5. +0
    -2
      src/Components/ModalList.js
  6. +4
    -4
      src/Components/Plants.js

+ 0
- 1
README.md View File

@ -1,4 +1,3 @@
## TODO
Plant page layout, what goes where and what info do we actually need in the frontend.<br />


+ 0
- 1
package.json View File

@ -7,7 +7,6 @@
"bootstrap": "^4.3.1",
"react": "^16.10.2",
"react-dom": "^16.10.2",
"react-lightbox-component": "^1.2.1",
"react-router-dom": "^5.1.2",
"react-scripts": "3.2.0"
},


+ 7
- 1
src/App.css View File

@ -40,10 +40,15 @@
text-align: center;
border: rgb(0, 0, 0) solid 2px;
}
.sys1 h6{
font-size: 25px;
}
.sys1 h5{
font-size: 35px;
}
.App-logo {
height: 40vmin;
}
@ -73,8 +78,9 @@
}
.modal-wrapper{
width: 50%;
display:grid;
grid-column-gap: 0px;
grid-column-gap: 12px;
grid-row-gap: 12px;
grid-template-columns: 1fr 1fr 1fr 1fr;


+ 0
- 24
src/Components/Fetchjson.js View File

@ -1,24 +0,0 @@
import React from 'react';
const Fetchjson = () => {
const fetchPlant = () =>{
fetch('../plantinfo.json')
.then(r => r.json())
.then(rData => console.log(rData))
}
return (
<div>
<button fetchPlant={fetchPlant}>
Fetch
</button>
</div>
);
};
export default Fetchjson;

+ 0
- 2
src/Components/ModalList.js View File

@ -18,8 +18,6 @@ const ModalList = () => {
]
const handleOpen = (e) => {
e.preventDefault();
imageList.filter((item, index) => parseInt(e.target.id) !== index)
setOpen(true);
};


+ 4
- 4
src/Components/Plants.js View File

@ -30,11 +30,11 @@ const Plants = () => {
<div className="plants">
<div className="plant">
<h6>Nimi: {plant.id}</h6>
<h6>Tyyppi: {plant.type}</h6>
<h6>Istutus päivä: {plant.istutuspv}</h6>
<h6>Nimi: {plant.id}</h6>
<h6>Tyyppi: {plant.type}</h6>
<h6>Istutus päivä: {plant.istutuspv}</h6>
<img alt="Broken" src={plant.imagefile} width="200" ></img>
</div>
</div>


Loading…
Cancel
Save