-
My coffee shop elections
-
Taste a real coffee like 1800s
+
My coffee shop elections
+
Taste a real coffee like 1800s
Order now
diff --git a/src/pages/Products.jsx b/src/pages/Products.jsx
index 7593577..e96b38a 100644
--- a/src/pages/Products.jsx
+++ b/src/pages/Products.jsx
@@ -1,11 +1,12 @@
import axios from "axios";
import React, { useEffect, useState } from "react";
+import "../styles/Products.css";
function Products() {
const [posts, setPosts] = useState([]);
const fetchProducts = async () => {
- const res = await axios.get("https://jsonplaceholder.typicode.com/photos");
+ const res = await axios.get("https://api.sampleapis.com/coffee/hot");
console.log(res.data);
setPosts(res.data);
return res;
@@ -17,14 +18,22 @@ function Products() {
return (
<>
-
Products
+
+
Products
+
{/*
Fetch Products */}
{posts.slice(0, 10).map((post) => (
- {post.title}
- {post.body}
-
+ {post.title}
+ {post.description}
+
+ {post.ingredients}
))}
diff --git a/src/pages/Recipes.jsx b/src/pages/Recipes.jsx
index b5453a7..ab0da49 100644
--- a/src/pages/Recipes.jsx
+++ b/src/pages/Recipes.jsx
@@ -1,28 +1,22 @@
+// import React, { useState } from "react";
import React, { useState } from "react";
import "../styles/Recipes.css";
function Recipes() {
- const [randomHouse, setRandomHouse] = useState(null);
+ const [randomRecipe, setRandomRecipe] = useState(null);
- const fetchRandomHouse = async () => {
+ const fetchRandomRecipe = async () => {
try {
const response = await fetch(
- `https://anapioficeandfire.com/api/houses/378`
+ `https://api.sampleapis.com/recipes/recipes`
);
if (!response.ok) {
throw new Error("Network response was not ok today");
}
const data = await response.json();
- // const houses = Object.keys(data.message);
- // const randomIndex = Math.floor(Math.random() * houses.length);
- // const randomHouses = houses[randomIndex];
- const randomHouse = {
- name: randomHouse,
- region: `${randomHouse} region.`,
- words: randomHouse,
- };
-
- setRandomHouse(randomHouse);
+ const randomIndex = Math.floor(Math.random() * data.length);
+ const randomDish = data[randomIndex];
+ setRandomRecipe(randomDish);
} catch (error) {
console.error("Error fetching recipes:", error);
}
@@ -32,16 +26,21 @@ function Recipes() {
Enjoy our recipes
- {""}
For a small meeting with your friends, or a celebration, you have a tons
of tasty recipes you can use, only assure yourself to click in this
- button :
+ button:
-
Open me
- {randomHouse && (
+
Open me
+ {randomRecipe && (
-
{randomHouse.name}
-
{randomHouse.region}
+
{randomRecipe.title}
+
{randomRecipe.cuisine}
+
{randomRecipe.mainIngredient}
+
)}
diff --git a/src/styles/About.css b/src/styles/About.css
index 02528c2..d40ce8f 100644
--- a/src/styles/About.css
+++ b/src/styles/About.css
@@ -21,6 +21,8 @@
}
.aboutBottom p {
width: 1200px;
+line-height: 30px;
+font-size: 18px;
}
.about .aboutBottom h1 {
font-weight: 400;
@@ -30,4 +32,15 @@ width: 1200px;
display: flex;
justify-content: center;
transform: translateY(-40px);
+ margin-bottom: 20px;
+}
+h1.aboutTitle{
+margin-top: 10px;
+font-family: cursive;
+}
+.aboutTop{
+ margin-bottom: 20px;
+}
+.paragraphTitle {
+ margin-top: 24px;
}
\ No newline at end of file
diff --git a/src/styles/Home.css b/src/styles/Home.css
index 8e1671d..6eed36f 100644
--- a/src/styles/Home.css
+++ b/src/styles/Home.css
@@ -14,20 +14,22 @@
width: auto;
margin-left: 50px;
}
-.headerContainer h1 {
+ h1.titleHome {
justify-content: center;
align-items: center;
font-size: 90px;
height: 60px;
font-weight: 50;
color: black;
+ margin-bottom: 45px;
}
-.headerContainer p {
+ p.paragraphHome {
padding: 0;
font-size: 40px;
font-weight: lighter;
color: black;
+ margin-bottom: 20px;
}
.headerContainer button {
diff --git a/src/styles/Menu.css b/src/styles/Menu.css
index fbd726f..1af8eed 100644
--- a/src/styles/Menu.css
+++ b/src/styles/Menu.css
@@ -18,6 +18,10 @@
grid-template-columns: 1fr 1fr 1fr;
place-items: center;
}
+
+ div.menuList a {
+ text-decoration: none;
+ }
/* MENU ITEM STYLING */
@@ -27,7 +31,11 @@
height: 350px;
margin: 20px;
box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.2);
+ text-decoration: none;
+ color: black;
+
}
+
.menuItem:hover {
box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.5);
transition: 0.3s ease-in;
@@ -43,11 +51,14 @@
background-repeat: no-repeat;
background-size: cover;
}
-
+
.menuItem h1,
.menuItem p {
margin-left: 20px;
+ margin-bottom: 20px;
+ margin-top: 20px;
}
+
.menuItem span {
margin-left: 10px;
diff --git a/src/styles/Products.css b/src/styles/Products.css
new file mode 100644
index 0000000..b81b2ae
--- /dev/null
+++ b/src/styles/Products.css
@@ -0,0 +1,30 @@
+* {
+ box-sizing: border-box;
+ margin: 0;
+ padding: 0;
+}
+ h3.apiTitle{
+ font-family: cursive;
+ font-size: 28px;
+ margin-left: 50px;
+ margin-bottom: 10px;
+}
+.apiParagraph {
+ margin-left: 50px;
+ margin-bottom: 10px;
+ font-size: 16px;
+}
+.apiImage {
+ display: flex;
+ justify-content: center;
+ margin-left: 50%;
+ margin-top: 2%;
+ margin-bottom: 1%;
+ border-radius: 40px 10px;
+ border: none;
+}
+span.apiSpan {
+margin-left: 50%;
+font-style: italic;
+margin-bottom: 10px;
+}
\ No newline at end of file