Skip to content

Commit

Permalink
Merge pull request #39 from the-collab-lab/selectedListFeature
Browse files Browse the repository at this point in the history
Added selected list feature
  • Loading branch information
IamHenryOkeke committed Apr 5, 2024
2 parents 8665b57 + 4c6e08e commit 96433d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/SingleList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React from 'react';
import './SingleList.css';
import { MdOutlineDeleteForever } from 'react-icons/md';
import { deleteList } from '../api';
import { Button } from '@mui/material';

export function SingleList({ name, path, setListPath, listPath, email }) {
// Function to handle selecting a list
const handleClick = () => {
setListPath(path);
localStorage.setItem('list', name);
};

// Function to handle deleting a list
Expand Down
5 changes: 1 addition & 4 deletions src/views/Layout.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Outlet } from 'react-router-dom';
import './Layout.css';
import { FaShoppingBag, FaUser, FaUserMinus } from 'react-icons/fa';
import { auth } from '../api/config.js';
import { SignInButton, SignOutButton, useAuth } from '../api/useAuth.jsx';
import { NavLink } from 'react-router-dom';

Expand All @@ -20,7 +19,6 @@ export function Layout() {
<>
<div className="Layout">
<header className="Layout-header">

<div className="login-user">
{!user ? (
<div className="flex justify-end gap-5 items-center">
Expand All @@ -41,7 +39,6 @@ export function Layout() {
<FaShoppingBag />
<h1>Smart Shopping List</h1>
</div>

</header>
<nav className="Nav">
<div className="Nav-container">
Expand All @@ -57,7 +54,7 @@ export function Layout() {
</div>
</nav>
<main className="Layout-main">
<h1 className="my-3 text-center font-extrabold text-4xl pb-9 capitalize">
<h1 className="my-3 text-center font-extrabold text-4xl pb-9 capitalize text-black dark:text-white">
{localStorage.getItem('list') || 'No list selected'}
</h1>
<Outlet />
Expand Down

0 comments on commit 96433d8

Please sign in to comment.