Skip to content

Commit

Permalink
add logo to fridge page -v
Browse files Browse the repository at this point in the history
  • Loading branch information
Aryan-Dang committed Nov 13, 2022
1 parent 886a541 commit bee675a
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/pages/Todo/FridgeList.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { FetchState, useGetTodos } from "../../hooks";
import Alert from "../Alert/Alert";
import FridgeItem from "./FridgeItem";
import { useHistory } from "react-router-dom";
import logo from '../../static/logo.png';

const Fridge = ({ user, dispatch }) => {
const [stale, setStale] = useState({ stale: false });
Expand Down Expand Up @@ -56,12 +57,19 @@ const Fridge = ({ user, dispatch }) => {
{isError && <Alert color="red" message="Something went wrong..." />}
<div className="my-auto p-16 rounded-lg text-center">
<div className="font-bold text-3xl md:text-5xl lg:text-6xl">
❄️ <br /> &nbsp; My Fridge
<img src={logo} alt="logo icon" style={{
width:200,
height:200,
marginLeft:"28%"
}}/>
<br /> &nbsp; My Fridge
</div>

{isLoading && <h1> Loading .... </h1>}

<ul>
<ul style={{
marginTop:"7%"
}}>
{todos.filter((item) => item["isBought"]).map((item) => (
<FridgeItem key={item["$id"]} item={item} setStale={setStale} />
))}
Expand All @@ -73,15 +81,15 @@ const Fridge = ({ user, dispatch }) => {
<button
onClick={handleNav}
className="mx-auto mt-4 py-3 px-12 font-semibold text-md rounded-lg shadow-md bg-white text-gray-900 border border-gray-900 hover:border-transparent hover:text-white hover:bg-gray-900 focus:outline-none">
Go to My Shopping List
Go to My Shopping List 🛍️
</button>
</section>
<section className="absolute top-0 right-0 py-3 px-6 mr-8 mb-8">
<button onClick={handleLogout} className="mx-auto mt-4 py-3 px-12 font-semibold text-md rounded-lg shadow-md bg-white text-gray-900 border border-gray-900 hover:border-transparent hover:text-white hover:bg-gray-900 focus:outline-none">
Logout
</button>
</section>

</>
);
};
Expand Down

0 comments on commit bee675a

Please sign in to comment.