Skip to content

Commit

Permalink
remove radix and sharp
Browse files Browse the repository at this point in the history
  • Loading branch information
htothenan1 committed Nov 3, 2023
1 parent d14a882 commit 61d2f4f
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 61 deletions.
4 changes: 2 additions & 2 deletions app/components/Footer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styles from "./styles/footer.module.css"
import { navigation } from "../data/icons"
import { navIcons } from "../data/icons"

export default function Footer() {
return (
Expand All @@ -14,7 +14,7 @@ export default function Footer() {
Hernan Berisso
</a>
</p>{" "}
{navigation.map((item) => (
{navIcons.map((item) => (
<a key={item.name} href={item.href} target="_blank">
<item.icon />
</a>
Expand Down
2 changes: 1 addition & 1 deletion app/components/ItemLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { addDays } from "date-fns"
import { useSession } from "next-auth/react"
import { generateStorageTip } from "../utils/openai"
import { ingredientsObjects } from "../data/ingredients"
import { ReloadIcon } from "@radix-ui/react-icons"
import { ReloadIcon } from "@/data/icons"
import styles from "./styles/itemLogger.module.css"

const ItemLogger = ({ items, selectedItem, handleSelectItem }) => {
Expand Down
14 changes: 6 additions & 8 deletions app/components/ItemsChecklist.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const ItemsChecklist = ({ items }) => {
}

const fetchRecipes = () => {
setLoading(true)
if (selectedItems.length) {
const queryString = selectedItems.map((item) => item).join(",+")
fetch(
Expand All @@ -36,6 +37,7 @@ const ItemsChecklist = ({ items }) => {
autoClose: 1000,
})
}
setLoading(false)
}

const handleSelectRecipe = (data) => {
Expand All @@ -59,16 +61,12 @@ const ItemsChecklist = ({ items }) => {
disabled={selectedItems.length === 0}
class={styles.addItemsButton}
>
{loading ? (
<ReloadIcon class={styles.reloadIcon} />
) : (
<p class={selectedItems.length && styles.whiteText}>
Get Recipes ({selectedItems.length})
</p>
)}
<p class={selectedItems.length && styles.whiteText}>
Get Recipes ({selectedItems.length})
</p>
</button>

<div role="list" class={styles.groceriesList}>
<div class={styles.groceriesList}>
{items.map((item) => (
<div
onClick={() => handleItemSelect(item)}
Expand Down
7 changes: 2 additions & 5 deletions app/components/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useState } from "react"
import { usePathname } from "next/navigation"
import { signOut } from "next-auth/react"
import Link from "next/link"
import { HamburgerMenuIcon } from "@radix-ui/react-icons"
import { HamburgerIcon } from "@/data/icons"
import styles from "./styles/navBar.module.css"

const CustomLink = ({ href, title, className = "" }) => {
Expand Down Expand Up @@ -34,7 +34,7 @@ const NavBar = ({ user }) => {
class={styles.hamburgerButton}
onClick={() => setNavOpen(!navOpen)}
>
<HamburgerMenuIcon class={styles.hamburgerIcon} aria-hidden="true" />
<HamburgerIcon class={styles.hamburgerIcon} aria-hidden="true" />
</button>
{navOpen ? (
<div class={styles.mobileCustomLink}>
Expand Down Expand Up @@ -100,9 +100,6 @@ const NavBar = ({ user }) => {
</button>
{accountMenuOpen && (
<div class={styles.signOutContainer}>
{/* <Link class={styles.accountText} href="/account">
Account
</Link> */}
<button
class={styles.signOutButton}
onClick={() => signOut({ callbackUrl: "/" })}
Expand Down
2 changes: 1 addition & 1 deletion app/components/SingleItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { useState } from "react"
import { useSession } from "next-auth/react"
import Calendar from "react-calendar"
import { ReloadIcon } from "@radix-ui/react-icons"
import { ReloadIcon } from "@/data/icons"
import { useSpring, a } from "@react-spring/web"
import {
deleteItemAction,
Expand Down
1 change: 1 addition & 0 deletions app/components/styles/itemsChecklist.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
background-color: #ff9f67;
color: #1e3a8a;
cursor: pointer;
border: none;
}

.addItemsButton:disabled {
Expand Down
38 changes: 37 additions & 1 deletion app/data/icons.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const navigation = [
export const navIcons = [
{
name: "LinkedIn",
href: "https://www.linkedin.com/in/hernanberisso/",
Expand Down Expand Up @@ -42,3 +42,39 @@ export const navigation = [
),
},
]
export const ReloadIcon = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width={25}
height={25}
fill="none"
viewBox="0 0 24 24"
{...props}
>
<path
fill="#000"
d="M4.395 12.001a.75.75 0 0 0 1.5-.001l-1.5.001Zm1.894-3.89.63.407-.63-.406Zm3.046-2.577-.295-.69h-.001l.296.69Zm3.921-.4.152-.735h-.002l-.15.735ZM16.73 7.05l-.54.52.54-.52Zm.984 3.157a.75.75 0 0 0 1.442-.415l-1.442.415Zm-.005-.396a.75.75 0 1 0 1.452.377l-1.452-.377Zm2.162-2.355a.75.75 0 1 0-1.452-.377l1.452.377Zm-1.636 3.266a.75.75 0 0 0 .4-1.445l-.4 1.445Zm-2.25-2.177a.75.75 0 1 0-.399 1.446l.4-1.446ZM19.896 12a.75.75 0 1 0-1.5.001l1.5-.001Zm-1.894 3.89-.63-.407.63.407Zm-3.046 2.578.296.689-.296-.69Zm-3.921.4-.152.734h.002l.15-.734ZM7.56 16.95l.54-.52v-.002l-.54.522Zm-.984-3.158a.75.75 0 0 0-1.442.415l1.442-.415Zm.005.396a.75.75 0 1 0-1.452-.377l1.452.377Zm-2.162 2.355a.75.75 0 1 0 1.452.377l-1.452-.377Zm1.636-3.266a.75.75 0 0 0-.4 1.445l.4-1.445Zm2.25 2.178a.75.75 0 0 0 .399-1.446l-.4 1.446ZM5.894 12a6.408 6.408 0 0 1 1.024-3.482l-1.26-.813A7.908 7.908 0 0 0 4.395 12l1.5-.001ZM6.92 8.518A6.087 6.087 0 0 1 9.63 6.223L9.04 4.845a7.587 7.587 0 0 0-3.38 2.86l1.26.813Zm2.71-2.295a5.85 5.85 0 0 1 3.476-.355l.3-1.47a7.35 7.35 0 0 0-4.366.446l.59 1.379Zm3.473-.355A5.975 5.975 0 0 1 16.19 7.57l1.08-1.04a7.475 7.475 0 0 0-3.861-2.132l-.306 1.469Zm3.088 1.704a6.297 6.297 0 0 1 1.523 2.636l1.442-.415a7.797 7.797 0 0 0-1.887-3.264l-1.078 1.043Zm2.97 2.617.71-2.732-1.452-.377-.71 2.732 1.452.377Zm-.526-.911-2.65-.732-.399 1.446 2.65.731.399-1.445ZM18.395 12a6.408 6.408 0 0 1-1.024 3.482l1.26.813A7.908 7.908 0 0 0 19.895 12l-1.5.001Zm-1.024 3.482a6.086 6.086 0 0 1-2.712 2.296l.592 1.378a7.587 7.587 0 0 0 3.38-2.861l-1.26-.813Zm-2.711 2.295a5.85 5.85 0 0 1-3.476.355l-.3 1.47a7.35 7.35 0 0 0 4.367-.446l-.591-1.379Zm-3.473.355A5.975 5.975 0 0 1 8.1 16.43l-1.08 1.041a7.474 7.474 0 0 0 3.862 2.13l.305-1.468ZM8.099 16.43a6.297 6.297 0 0 1-1.523-2.637l-1.442.415a7.797 7.797 0 0 0 1.887 3.264l1.078-1.043Zm-2.97-2.618-.71 2.732 1.452.377.71-2.732-1.452-.377Zm.526.912 2.65.732.399-1.446-2.65-.732-.399 1.445Z"
/>
</svg>
)

export const HamburgerIcon = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width={800}
height={800}
viewBox="0 0 24 24"
{...props}
>
<title>{"Menu"}</title>
<g fill="white" fillRule="evenodd">
<path d="M0 0h24v24H0z" />
<path
stroke="#0C0310"
strokeLinecap="round"
strokeWidth={2}
d="M5 7h14M5 17h14M5 12h14"
/>
</g>
</svg>
)
31 changes: 0 additions & 31 deletions app/data/ingredients.js
Original file line number Diff line number Diff line change
Expand Up @@ -623,34 +623,3 @@ export const ingredientsObjects = [
"Moisture can cause zucchini to mold and spoil. Make sure the zucchini are dry before storing them in the refrigerator. You can pat them dry with a paper towel if needed.",
},
]

// "Wine", "Worchestershire Sauce", "Vegetable Oil","Vanilla Extract", "Thyme", "Tomato Paste",
// "Soy Sauce", "Trail Mix","Instant Oatmeal",
// "Tea", "Sunflower Seeds","Quinoa", "Popcorn",
// "Red Wine Vinegar", "Paprika", "Cayenne Pepper",
// "Parsley", "White Rice", "Cilantro",
// "Cinnamon", "Chips",
// "Chocolate Chips", "Brown Rice",
// "Cocoa Powder","Brown Sugar",
// "Rice Vinegar",
// "Baking Powder", "Rosemary", "Sea Salt", "Olive Oil",
// "Sesame Seeds", "Garlic Powder",
// "Granola Bars", "Pasta Sauce",
// "Sesame Oil", "Cumin", "Honey", "Bay Leaves",
// "Curry Powder", "Mustard", "Black Pepper",
// "Dried Fruit", "Evaporated Milk", "Oregano",
// "Flax Seeds",
// "Flour", "Cream of Wheat", "Breakfast Cereal",
// "Crushed Red Pepper",
// "Onion Powder", "Coffee", "Hemp Seeds",
// "Cookies", "Canned Beans",
// "Canned Soup","Basil",
// "Canned Tuna",
// "Canola Oil", "Marshmallows", "Cereal",
// "Chia Seeds",
// "Couscous",
// "Baking Soda", "Candy",
// "Balsamic Vinegar", "Cajun Seasoning", "Maple Syrup", "Nutmeg", "Agave Syrup", "Ketchup", "Pretzels", "Peanut Butter",
// "Chile Powder",
// "Mixed Nuts",
// "Hot Sauce", "Fruit Leather",
9 changes: 0 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"dependencies": {
"@next-auth/prisma-adapter": "^1.0.7",
"@prisma/client": "^5.5.2",
"@radix-ui/react-icons": "^1.3.0",
"@react-spring/web": "^9.7.3",
"@vercel/analytics": "^1.0.1",
"bcrypt": "^5.1.0",
Expand All @@ -31,8 +30,7 @@
"react-calendar": "^4.6.1",
"react-chartjs-2": "^5.2.0",
"react-dom": "18.2.0",
"react-toastify": "^9.1.3",
"sharp": "^0.32.6"
"react-toastify": "^9.1.3"
},
"devDependencies": {
"@types/bcrypt": "^5.0.0",
Expand Down
Binary file removed public/waste-not.png
Binary file not shown.

0 comments on commit 61d2f4f

Please sign in to comment.