Skip to content

Commit 126953b

Browse files
committed
merge recipe-finder -> master
1 parent 07285e2 commit 126953b

File tree

7 files changed

+73
-14
lines changed

7 files changed

+73
-14
lines changed

RecipeFinder/package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
{
22
"name": "clean-react-app",
3-
"version": "0.1.0",
3+
"version": "1.1.0",
44
"private": true,
5+
"license": "CC",
56
"dependencies": {
7+
"@fortawesome/fontawesome-svg-core": "^1.2.35",
8+
"@fortawesome/free-regular-svg-icons": "^5.15.3",
9+
"@fortawesome/react-fontawesome": "^0.1.14",
610
"@reduxjs/toolkit": "^1.6.0",
7-
"font-awesome": "^4.7.0",
811
"react": "^17.0.2",
912
"react-dom": "^17.0.2",
1013
"react-redux": "^7.2.4",

RecipeFinder/src/components/Footer.jsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ import styles from "../styles/Footer.module.css";
33
const Footer = () => (
44
<div className={styles.footer}>
55
<div>Made with 💝 with React ⚛️ by </div>
6-
<div> &copy; Ankur Paul (nooobcoder) - 2021</div>
6+
<div>
7+
{" "}
8+
&copy;{" "}
9+
<a href="https://github.com/nooobcoder/" target="_blank" rel="noreferrer">
10+
Ankur Paul (nooobcoder) - 2021
11+
</a>
12+
</div>
713
</div>
814
);
915

RecipeFinder/src/components/RecipeCard.jsx

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import styles from "../styles/RecipeCard.module.css";
2-
import "../../node_modules/font-awesome/css/font-awesome.css";
32
import { useEffect, useState } from "react";
3+
import { faHeart } from "@fortawesome/free-regular-svg-icons";
4+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
5+
46
import { useSelector } from "react-redux";
57

68
const RecipeCard = () => {
@@ -46,13 +48,21 @@ const RecipeCard = () => {
4648
<div className={styles.recipe_card} key={meal.idMeal}>
4749
<div className={styles.heading_container}>
4850
<h3>{meal.strMeal}</h3>
49-
50-
<i
51+
<div>
52+
<FontAwesomeIcon
53+
icon={faHeart}
54+
className={`${styles.icon} ${
55+
isFavorite[mealIndex] ? styles.red : ""
56+
}`}
57+
onClick={() => toggleFavoriteStatus(mealIndex)}
58+
/>
59+
</div>
60+
{/* <i
5161
className={"fa fa-heart ".concat(
5262
`${isFavorite[mealIndex] ? styles.red : ""}`
5363
)}
5464
onClick={() => toggleFavoriteStatus(mealIndex)}
55-
></i>
65+
></i> */}
5666
</div>
5767

5868
<div className={styles.recipe_container}>

RecipeFinder/src/styles/Footer.module.css

+7
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,10 @@
1313
color: blueviolet;
1414
text-align: center;
1515
}
16+
17+
a,
18+
a:visited,
19+
a:hover,
20+
a:active {
21+
color: inherit;
22+
}

RecipeFinder/src/styles/Header.module.css

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
margin: 0px 10px;
88
border: none;
99
font-size: 1.2rem;
10+
text-align: center;
1011
border-radius: 5px;
1112
padding: 8px 10px;
1213
}

RecipeFinder/src/styles/RecipeCard.module.css

+13-2
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,25 @@
1111
position: relative;
1212
flex-direction: row;
1313
flex-wrap: wrap;
14-
justify-content: center;
14+
justify-content: space-between;
1515
align-items: center;
1616
}
1717

18-
.heading_container > i {
18+
.heading_container > h3 {
19+
flex: 1;
20+
}
21+
22+
/* .heading_container > svg {
1923
position: absolute;
2024
cursor: pointer;
2125
right: 10px;
26+
margin-right: 50px;
27+
} */
28+
29+
.icon {
30+
position: relative;
31+
cursor: pointer;
32+
right: 10px;
2233
}
2334

2435
.recipe_container {

RecipeFinder/yarn.lock

+26-5
Original file line numberDiff line numberDiff line change
@@ -1170,6 +1170,32 @@
11701170
minimatch "^3.0.4"
11711171
strip-json-comments "^3.1.1"
11721172

1173+
"@fortawesome/fontawesome-common-types@^0.2.35":
1174+
version "0.2.35"
1175+
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.35.tgz#01dd3d054da07a00b764d78748df20daf2b317e9"
1176+
integrity sha512-IHUfxSEDS9dDGqYwIW7wTN6tn/O8E0n5PcAHz9cAaBoZw6UpG20IG/YM3NNLaGPwPqgjBAFjIURzqoQs3rrtuw==
1177+
1178+
"@fortawesome/fontawesome-svg-core@^1.2.35":
1179+
version "1.2.35"
1180+
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.35.tgz#85aea8c25645fcec88d35f2eb1045c38d3e65cff"
1181+
integrity sha512-uLEXifXIL7hnh2sNZQrIJWNol7cTVIzwI+4qcBIq9QWaZqUblm0IDrtSqbNg+3SQf8SMGHkiSigD++rHmCHjBg==
1182+
dependencies:
1183+
"@fortawesome/fontawesome-common-types" "^0.2.35"
1184+
1185+
"@fortawesome/free-regular-svg-icons@^5.15.3":
1186+
version "5.15.3"
1187+
resolved "https://registry.yarnpkg.com/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.15.3.tgz#1ec4f2410ff638db549c5c5484fc60b66407dbe6"
1188+
integrity sha512-q4/p8Xehy9qiVTdDWHL4Z+o5PCLRChePGZRTXkl+/Z7erDVL8VcZUuqzJjs6gUz6czss4VIPBRdCz6wP37/zMQ==
1189+
dependencies:
1190+
"@fortawesome/fontawesome-common-types" "^0.2.35"
1191+
1192+
"@fortawesome/react-fontawesome@^0.1.14":
1193+
version "0.1.14"
1194+
resolved "https://registry.yarnpkg.com/@fortawesome/react-fontawesome/-/react-fontawesome-0.1.14.tgz#bf28875c3935b69ce2dc620e1060b217a47f64ca"
1195+
integrity sha512-4wqNb0gRLVaBm/h+lGe8UfPPivcbuJ6ecI4hIgW0LjI7kzpYB9FkN0L9apbVzg+lsBdcTf0AlBtODjcSX5mmKA==
1196+
dependencies:
1197+
prop-types "^15.7.2"
1198+
11731199
11741200
version "2.1.4"
11751201
resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5"
@@ -5067,11 +5093,6 @@ follow-redirects@^1.0.0:
50675093
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.2.tgz#dd73c8effc12728ba5cf4259d760ea5fb83e3147"
50685094
integrity sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==
50695095

5070-
font-awesome@^4.7.0:
5071-
version "4.7.0"
5072-
resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133"
5073-
integrity sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM=
5074-
50755096
for-in@^1.0.2:
50765097
version "1.0.2"
50775098
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"

0 commit comments

Comments
 (0)