Skip to content

Commit

Permalink
Merge pull request #47 from the-collab-lab/yj-ky-list-item-chakra-2
Browse files Browse the repository at this point in the history
Fixed merge conflicts
  • Loading branch information
Yaosaur committed May 29, 2023
2 parents 6c7a963 + 99589d1 commit 72ff629
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/components/AddItem.jsx
@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react';
import { useState } from 'react';
import {
Box,
Drawer,
Expand All @@ -17,7 +17,6 @@ import {
Flex,
Stack,
Heading,
Text,
} from '@chakra-ui/react';
import { addItem } from '../api/firebase';

Expand Down
13 changes: 5 additions & 8 deletions src/views/List.jsx
@@ -1,7 +1,5 @@

import { Fragment, useState, useEffect, useRef } from 'react';
import { Fragment, useState, useRef } from 'react';
import { comparePurchaseUrgency } from '../api';
import { Button, IconButton, Text, useDisclosure } from '@chakra-ui/react';
import { AddIcon } from '@chakra-ui/icons';
import { AddItem } from '../components/AddItem';
import { ListItem } from '../components';
Expand All @@ -21,15 +19,14 @@ import {
Input,
InputRightElement,
IconButton,
useDisclosure,
} from '@chakra-ui/react';
import { CopyIcon, CloseIcon } from '@chakra-ui/icons';

export function List({ data, listId }) {
const [searchInput, setSearchInput] = useState('');
const [isOpen, setIsOpen] = useState(false);
const successToast = useToast({ variant: 'successToast' });
const errorToast = useToast({ variant: 'errorToast' });
const [dialogText, setDialogText] = useState('');
const btnRef = useRef();
const { isOpen: isDrawerOpen, onOpen, onClose } = useDisclosure();

Expand Down Expand Up @@ -80,6 +77,7 @@ export function List({ data, listId }) {
<Text>Token:</Text>
<Text>
{listId}

<IconButton
aria-label="delete"
size="sm"
Expand All @@ -93,7 +91,6 @@ export function List({ data, listId }) {
icon={<CopyIcon />}
/>
</Text>
<>
<IconButton
aria-label="Add Item"
icon={<AddIcon />}
Expand Down Expand Up @@ -132,8 +129,8 @@ export function List({ data, listId }) {
gap: '1em',
}}
>
<Text>Your shopping list is currently empty.</Text>
</section>
<p>Your shopping list is currently empty.</p>
</section>
)}
{Object.values(categorizedData).flat().length !== 0 && (
<form
Expand Down

0 comments on commit 72ff629

Please sign in to comment.