diff --git a/src/components/Dropdown.js b/src/components/Dropdown.js
index 9260d63..cedcf3b 100644
--- a/src/components/Dropdown.js
+++ b/src/components/Dropdown.js
@@ -20,9 +20,6 @@ const WrapperDropdown = styled(View)`
const DropdownItem = styled(Text)`
color: ${({ theme }) => theme.colors.textW2};
font-size: 20px;
- &:hover{
- background-color: #0001;
- }
`
const HorizontalSeperator = styled(View)`
width: 100%;
diff --git a/src/components/GroceryList/TabMenu.js b/src/components/GroceryList/TabMenu.js
index 471a0d6..7db535c 100644
--- a/src/components/GroceryList/TabMenu.js
+++ b/src/components/GroceryList/TabMenu.js
@@ -16,10 +16,10 @@ const TabMenu = (props) => {
handleTabPress("Groceries")}>
-
+ {/* */}
handleTabPress("Products")}>
-
+ {/* */}
)
diff --git a/src/components/GroceryList/groceries/GroceryButtons.js b/src/components/GroceryList/groceries/GroceryButtons.js
index d5af515..907552d 100644
--- a/src/components/GroceryList/groceries/GroceryButtons.js
+++ b/src/components/GroceryList/groceries/GroceryButtons.js
@@ -19,7 +19,7 @@ const SelectAllItemsButton = (props) => {
}
return (
-
+ {/* */}
)
}
@@ -34,7 +34,7 @@ const RemoveItemsButton = (props) => {
}
return (
-
+ {/* */}
)
}
@@ -46,7 +46,7 @@ export const ContainerButtons = (props) => {
setVisible(!visible)}>
-
+ {/* */}
>
)
@@ -60,7 +60,7 @@ export const AddItemButton = (props) => {
return (
<>
setVisibleItem(true)}>
-
+ {/* */}
setVisibleItem(false)} />
>
@@ -69,7 +69,7 @@ export const AddItemButton = (props) => {
return (
<>
setVisibleList(true)}>
-
+ {/* */}
setVisibleList(false)} />
>
diff --git a/src/components/GroceryList/groceries/GroceryList.js b/src/components/GroceryList/groceries/GroceryList.js
index db9763e..3c13343 100644
--- a/src/components/GroceryList/groceries/GroceryList.js
+++ b/src/components/GroceryList/groceries/GroceryList.js
@@ -7,7 +7,8 @@ import { selectAllSortedItems } from '../../../redux/slices/groceryList/itemsSli
//styles
import { WrapperGroceryList, TextTotalAmount } from './styles/list'
import { selectAllProducts } from '../../../redux/slices/groceryList/productsSlice';
-import { View } from 'react-native';
+import { ScrollView, View } from 'react-native';
+import HeaderPadding from '../../Header';
const GroceryList = (props) => {
const items = useSelector(selectAllSortedItems)
@@ -25,8 +26,11 @@ const GroceryList = (props) => {
return (
total: € {totalPrice}
- {Lists}
-
+
+
+ {Lists}
+
+
)
}
diff --git a/src/components/GroceryList/groceries/List.js b/src/components/GroceryList/groceries/List.js
index 6b229e5..5083fe0 100644
--- a/src/components/GroceryList/groceries/List.js
+++ b/src/components/GroceryList/groceries/List.js
@@ -1,10 +1,10 @@
-import React, { useEffect, useRef, useState } from 'react'
+import React, { useState , useEffect} from 'react'
//components
import ListedItem from './ListedItem'
import ModalEditItem from '../../modals/groceries/ModalEditItem';
import ModalEditList from '../../modals/groceries/ModalEditList';
// Styling
-import { Wrapper, WrapperList, WrapperListTitle, ListTitle, ListSubtitle, ButtonRemoveList, ButtonEditList, IconArrowDown, ListSizeWrapper } from './styles/list'
+import { Wrapper, WrapperList, WrapperListTitle, ListTitle, ListSubtitle, ButtonRemoveList, ButtonEditList, IconArrowDown, ListSizeWrapper, WrapperRight, WrapperLeft } from './styles/list'
//redux
import { useSelector, useDispatch } from 'react-redux';
import { selectAllSortedItems, itemsRemovedByList } from '../../../redux/slices/groceryList/itemsSlice'
@@ -15,12 +15,11 @@ export default React.memo((props) => {
const items = useSelector(selectAllSortedItems)
const list = useSelector(state => state.lists.entities.find((list) => list._id === props.listId))
- const [height, setHeight] = useState(0);
- const ref = useRef(null);
+ const [height, setHeight] = useState(100);
useEffect(() => {
- setHeight(ref.current.clientHeight);
- }, [list.open, items]);
+ setHeight(1);
+ }, [list.open, items]);
const dispatch = useDispatch()
@@ -41,21 +40,21 @@ export default React.memo((props) => {
}
return (
- { dispatch(toggleOpen(props.listId)) }}>
-
+ { dispatch(toggleOpen(props.listId)) }}>
+
{list.listName}
{list.listDescription && list.listDescription}
-
-
+
+
{list.open && <>
- setModalListVisible(true)} />
-
+ {/* setModalListVisible(true)} />
+ */}
>}
-
-
+ {/* */}
+
- < WrapperList listLength={items.length} ref={ref}>
+ < WrapperList listLength={items.length} onLayout={(event) => {setHeight(event.nativeEvent.layout.height)}}>
{list.open && itemList}
{
itemList.length === 0 && Add a grocery
diff --git a/src/components/GroceryList/groceries/ListedItem.js b/src/components/GroceryList/groceries/ListedItem.js
index b63ab19..1fc9083 100644
--- a/src/components/GroceryList/groceries/ListedItem.js
+++ b/src/components/GroceryList/groceries/ListedItem.js
@@ -9,7 +9,6 @@ import { selectItemById, checkToggle, modalToggle } from '../../../redux/slices/
import { findTag } from '../../../redux/slices/groceryList/tagsSlice'
const ListedItem = React.memo((props) => {
- console.log("Rendering item")
const dispatch = useDispatch()
const item = useSelector(state => selectItemById(state, props.item._id), shallowEqual)
const tag = useSelector(state => findTag(state, item.tag))
@@ -20,7 +19,7 @@ const ListedItem = React.memo((props) => {
{item.productName}
{item.details}
{item.amount.am}{item.amount.qt && " " + item.amount.qt}
- {item.person && {item.person}}
+ {item.person && item.person}
{/* {product.image && } */}
diff --git a/src/components/GroceryList/groceries/styles/buttons.js b/src/components/GroceryList/groceries/styles/buttons.js
index fb8f94b..67d31df 100644
--- a/src/components/GroceryList/groceries/styles/buttons.js
+++ b/src/components/GroceryList/groceries/styles/buttons.js
@@ -1,7 +1,7 @@
import styled, { css } from 'styled-components'
//dependencies
-import { MdAddShoppingCart, MdDeleteForever} from 'react-icons/md'
-import { FiMenu,FiCheckSquare } from 'react-icons/fi'
+import { MdAddShoppingCart, MdDeleteForever } from 'react-icons/md'
+import { FiMenu, FiCheckSquare } from 'react-icons/fi'
import { CgFileAdd } from 'react-icons/cg'
//blueprints
import { Button } from '../../../../styles/componentBlueprints'
@@ -10,114 +10,65 @@ import { Button } from '../../../../styles/componentBlueprints'
export const WrapperButtons = styled(Button)`
position:absolute;
background-color: ${({ theme }) => theme.colors.primary};
- bottom:50px;
- left:20px;
- @media ${({ theme }) => theme.mediaQueries.below768}{
- bottom:70px;
- left:10px;
- }
+ bottom:70px;
+ left:10px;
`
export const WrapperAddItem = styled(Button)`
position:absolute;
background-color: ${({ theme }) => theme.colors.primary};
- bottom:50px;
- right:20px;
- @media ${({ theme }) => theme.mediaQueries.below768}{
- bottom:70px;
- right:10px;
- }
+ bottom:70px;
+ right:10px;
`
export const WrapperAddList = styled(Button)`
position:absolute;
background-color: ${({ theme }) => theme.colors.secondary};
- bottom:50px;
- right:20px;
- @media ${({ theme }) => theme.mediaQueries.below768}{
- bottom:70px;
- right:10px;
- }
+ bottom:70px;
+ right:10px;
`
export const WrapperRemove = styled(Button)`
position:absolute;
background-color: ${({ theme }) => theme.colors.error};
- left:20px;
- @media ${({ theme }) => theme.mediaQueries.below768}{
- left:10px;
- ${(props) =>
- props.visible
- ? css`
- bottom:140px;
- `
- : css`
- bottom:70px;
- `}
- }
+ left:10px;
${(props) =>
- props.visible
- ? css`
+ props.visible
+ ? css`
bottom:140px;
- `
- : css`
- bottom:50px;
- `}
+ `
+ : css`
+ bottom:70px;
+ `}
`
export const WrapperSelect = styled(Button)`
position:absolute;
background-color: ${({ theme }) => theme.colors.primary};
- left:20px;
- @media ${({ theme }) => theme.mediaQueries.below768}{
- left:10px;
- ${(props) =>
- props.visible
- ? css`
- bottom:210px;
- `
- : css`
- bottom:70px;
- `};
- }
+ left:10px;
${(props) =>
props.visible
? css`
- bottom:230px;
- `
+ bottom:210px;
+ `
: css`
- bottom:50px;
- `};
+ bottom:70px;
+ `};
`
export const MenuIcon = styled(FiMenu)`
- color: ${({theme})=> theme.colors.textB2};
- font-size: 60px;
- @media ${({ theme }) => theme.mediaQueries.below768}{
- font-size: 47px;
- }
+ color: ${({ theme }) => theme.colors.textB2};
+ font-size: 47px;
`
export const PlusIcon = styled(MdAddShoppingCart)`
-color: ${({theme})=> theme.colors.textB2};
- font-size: 60px;
- @media ${({ theme }) => theme.mediaQueries.below768}{
- font-size: 45px;
- }
+color: ${({ theme }) => theme.colors.textB2};
+ font-size: 45px;
`
export const RemoveIcon = styled(MdDeleteForever)`
-color: ${({theme})=> theme.colors.textB2};
- font-size: 60px;
- @media ${({ theme }) => theme.mediaQueries.below768}{
- font-size: 45px;
- }
+color: ${({ theme }) => theme.colors.textB2};
+ font-size: 45px;
`
export const CheckIcon = styled(FiCheckSquare)`
- color: ${({theme})=> theme.colors.textB2};
- font-size: 50px;
- @media ${({ theme }) => theme.mediaQueries.below768}{
- font-size: 40px;
- }
+ color: ${({ theme }) => theme.colors.textB2};
+ font-size: 40px;
`
export const ListIcon = styled(CgFileAdd)`
- color: ${({theme})=> theme.colors.textB2};
- font-size: 50px;
- @media ${({ theme }) => theme.mediaQueries.below768}{
- font-size: 40px;
- }
+ color: ${({ theme }) => theme.colors.textB2};
+ font-size: 40px;
`
\ No newline at end of file
diff --git a/src/components/GroceryList/groceries/styles/list.js b/src/components/GroceryList/groceries/styles/list.js
index b4c3ed8..e795304 100644
--- a/src/components/GroceryList/groceries/styles/list.js
+++ b/src/components/GroceryList/groceries/styles/list.js
@@ -1,4 +1,4 @@
-import { Text, View } from 'react-native'
+import { Text, TouchableOpacity, View } from 'react-native'
import styled, { css } from 'styled-components'
import { MdClose } from 'react-icons/md'
import { BiEditAlt } from 'react-icons/bi'
@@ -15,10 +15,7 @@ export const Wrapper = styled(View)`
border-bottom-width: 3px;
/* border-radius: 15px; */
margin-bottom: 10px;
- width: 768px;
- @media ${({ theme }) => theme.mediaQueries.below768}{
- width: 100%;
- }
+ width: 100%;
`
export const ListSizeWrapper = styled(View)`
height: ${(props) => props.visible ? props.height + 'px' : css`0px`};
@@ -32,7 +29,7 @@ export const WrapperList = styled(View)`
align-items: center;
overflow: hidden;
`
-export const WrapperListTitle = styled(View)`
+export const WrapperListTitle = styled(TouchableOpacity)`
display: flex;
width: 100%;
min-height: 60px;
@@ -40,26 +37,25 @@ export const WrapperListTitle = styled(View)`
justify-content: center;
align-items: center;
padding: 3px;
- #left {
- display: flex;
- flex-direction: column;
- width: 50%;
- }
- #right {
- width: 50%;
- display: flex;
- align-items: flex-start;
- justify-content: flex-end;
- flex-direction: row;
- }
-
+`
+export const WrapperLeft = styled(View)`
+ display: flex;
+ flex-direction: column;
+ width: 50%;
+`
+export const WrapperRight = styled(View)`
+ width: 50%;
+ display: flex;
+ align-items: flex-start;
+ justify-content: flex-end;
+ flex-direction: row;
`
export const ListTitle = styled(Text)`
- overflow-wrap: break-word;
+ /* overflow-wrap: break-word; */
font-size: 20px;
`
export const ListSubtitle = styled(Text)`
- overflow-wrap: break-word;
+ /* overflow-wrap: break-word; */
color: ${({ theme }) => theme.colors.textB5};
font-size: 17px;
`
diff --git a/src/components/GroceryList/groceries/styles/listedItem.js b/src/components/GroceryList/groceries/styles/listedItem.js
index 8e813c7..7905515 100644
--- a/src/components/GroceryList/groceries/styles/listedItem.js
+++ b/src/components/GroceryList/groceries/styles/listedItem.js
@@ -5,10 +5,8 @@ export const Wrapper = styled(View)`
display: flex;
flex-direction: row;
align-items: flex-start;
- width: 768px;
- @media ${({ theme }) => theme.mediaQueries.below768}{
- width: 100vw;
- }
+ justify-content: flex-start;
+ width: 100%;
`
export const DarkLayer = styled(View)`
background-color: ${({ theme }) => theme.colors.dp00};
@@ -22,18 +20,15 @@ export const DarkLayer = styled(View)`
export const WrapperItem = styled(View)`
box-shadow: ${({ theme }) => theme.colors.shadow};
display: flex;
- flex: 1;
min-height: ${props => props.person ? css`60px` : css`30px`};
position: relative;
+ width: 100%;
flex-direction: column;
justify-content: center;
border-radius: 15px;
background-color: ${props => props.checked ? props.theme.colors.itemSelected : props.color + '66'};
- &:hover{
- background-color: ${props => props.checked ? props.theme.colors.itemSelected : props.color + '77'};
- }
`
export const WrapperButton = styled(View)`
height: 30px;
@@ -41,7 +36,7 @@ export const WrapperButton = styled(View)`
`
export const TextProductName = styled(Text)`
/* word-wrap: break-word; */
- word-break: break-all;
+ /* word-break: break-all; */
margin: 2px 0px 0px 8px;
max-width: 70%;
@@ -50,7 +45,7 @@ export const TextProductName = styled(Text)`
color: ${props => props.theme.colors.textW1};
`
export const TextDetails = styled(Text)`
- word-wrap: break-word;
+ /* word-wrap: break-word; */
margin: 2px 0px 3px 8px;
max-width: 65%;
@@ -62,10 +57,10 @@ export const TextAmount = styled(Text)`
position: absolute;
max-width: 100px;
max-height: 30px;
- word-wrap: break-word;
- text-overflow: ellipsis;
+ /* word-wrap: break-word; */
+ /* text-overflow: ellipsis; */
overflow:hidden;
- white-space:nowrap;
+ /* white-space:nowrap; */
right: 0px;
margin: 3px 3px 3px 3px;
font-size: 16px;
@@ -78,11 +73,11 @@ export const TextAmount = styled(Text)`
`
export const TextPerson = styled(Text)`
position: absolute;
- word-wrap: break-word;
+ /* word-wrap: break-word; */
max-width: 100px;
- text-overflow: ellipsis;
+ /* text-overflow: ellipsis; */
overflow:hidden;
- white-space:nowrap;
+ /* white-space:nowrap; */
right: 0px;
bottom: 0px;
font-size: 16px;
diff --git a/src/components/GroceryList/products/ListedProduct.js b/src/components/GroceryList/products/ListedProduct.js
index 56c4d43..09c3703 100644
--- a/src/components/GroceryList/products/ListedProduct.js
+++ b/src/components/GroceryList/products/ListedProduct.js
@@ -23,7 +23,7 @@ const ListedProduct = React.memo((props) => {
dispatch(checkToggle(product._id))} >
-
+ {/* */}
diff --git a/src/components/GroceryList/products/ProductButtons.js b/src/components/GroceryList/products/ProductButtons.js
index d5f2119..7e753e1 100644
--- a/src/components/GroceryList/products/ProductButtons.js
+++ b/src/components/GroceryList/products/ProductButtons.js
@@ -24,7 +24,7 @@ const UploadProductsButton = (props) => {
openFile(evt)}
multiple={false} />
-
+ {/* */}
)
}
@@ -41,7 +41,7 @@ const DownloadProductsButton = (props) => {
}
return (
-
+ {/* */}
)
}
@@ -56,7 +56,7 @@ const RemoveProductsButton = (props) => {
}
return (
-
+ {/* */}
)
}
@@ -68,7 +68,7 @@ export const ContainerButtons = (props) => {
setVisible(!visible)}>
-
+ {/* */}
>
)
@@ -80,7 +80,7 @@ export const AddProductButton = (props) => {
return (
<>
setVisible(true)}>
-
+ {/* */}
>
diff --git a/src/components/GroceryList/products/styles/listedProduct.js b/src/components/GroceryList/products/styles/listedProduct.js
index 3d9bbee..ee01471 100644
--- a/src/components/GroceryList/products/styles/listedProduct.js
+++ b/src/components/GroceryList/products/styles/listedProduct.js
@@ -27,10 +27,6 @@ export const WrapperProduct = styled(View)`
margin-left: 7px;
background-color: ${props => props.checked ? props.theme.colors.itemSelected : props.color + '66'};
- &:hover{
- background-color: ${props => props.checked ? props.theme.colors.itemSelected : props.color + '77'};
- }
-
`
export const WrapperButton = styled(View)`
height: 60px;
@@ -47,9 +43,6 @@ export const CheckButton = styled(View)`
border-radius: 15px;
margin: 0px 5px ;
background-color: ${props => props.checked ? props.theme.colors.selected : props.theme.colors.buttonGrey};
- &:hover{
- background-color: ${props => props.checked ? props.theme.colors.selected : LightenDarken(props.theme.colors.buttonGrey, 5)}
- }
`
export const WrapperText = styled(View)`
@@ -60,20 +53,20 @@ export const WrapperText = styled(View)`
}
`
export const TextProductName = styled(Text)`
- word-wrap: break-word;
+ /* word-wrap: break-word; */
max-width: 70%;
margin: 0px 0px 0px 5px;
font-size: 16px;
color: ${props => props.theme.colors.textW1};
`
export const TextTag = styled(Text)`
- word-wrap: break-word;
+ /* word-wrap: break-word; */
margin: 2px 0px 0px 5px;
font-size: 16px;
color: ${props => LightenDarken(props.color,-30)};
`
export const TextPrice = styled(Text)`
- word-wrap: break-word;
+ /* word-wrap: break-word; */
margin: 0px 6px 3px 3px;
font-size: 16px;
diff --git a/src/components/GroceryList/styles/tabMenu.js b/src/components/GroceryList/styles/tabMenu.js
index d3b66e3..1ccb1ed 100644
--- a/src/components/GroceryList/styles/tabMenu.js
+++ b/src/components/GroceryList/styles/tabMenu.js
@@ -39,7 +39,6 @@ export const WrapperSelected = styled(View)`
width: 125px;
height: 50px;
border-radius:25px;
- //anims
${(props) =>
props.currenttab === 'Groceries'
? css`
@@ -55,9 +54,6 @@ export const WrapperSelected = styled(View)`
export const WrapperGroceries = styled(WrapperIcon)`
flex:1;
height: 65px;
- /* &:hover{
- background-color: #fffa;
- } */
`
export const IconGroceries = styled(RiShoppingBasketLine)`
font-size: ${iconSize};
@@ -71,9 +67,6 @@ export const IconGroceries = styled(RiShoppingBasketLine)`
export const WrapperProducts = styled(WrapperIcon)`
flex:1;
height: 65px;
- /* &:hover{
- background-color: #fff4;
- } */
`
export const IconProducts = styled(FaAppleAlt)`
diff --git a/src/components/modals/groceries/ModalAddItem.js b/src/components/modals/groceries/ModalAddItem.js
index 3615448..900ccd6 100644
--- a/src/components/modals/groceries/ModalAddItem.js
+++ b/src/components/modals/groceries/ModalAddItem.js
@@ -36,7 +36,6 @@ const ModalAddItem = (props) => {
am: amount ? Number(amount) : 1,
qt: qt
}
- console.log(amountObj)
let listId = lists.find((list) => list.open === true)._id
if (tags.find(t => t.tagName === tag)) {
dispatch(itemAdded({ productName, amount: amountObj, person, details, tag, price, listId }));
@@ -65,7 +64,7 @@ const ModalAddItem = (props) => {
setPrice(product.price)
}
return (
-
+
Add product
{/* {product && product.image && } */}
@@ -75,19 +74,19 @@ const ModalAddItem = (props) => {
value={productName}
onChange={(text) => setProductName(text.target.value)}
placeholder="Product name" />
- {productName ? : }
+ {/* {productName ? : } */}
{focusedProduct &&
product.productName)} text={productName} setElement={handleDropdownPress} />
}
-
+ {/* */}
setAmount(text.target.value)}
placeholder="Amount" />
- {amount ? : }
+ {/* {amount ? : } */}
setFocusedQt(true)} onBlur={() => { setTimeout(() => { setFocusedQt(false) }, 100) }}
type="text"
@@ -99,21 +98,21 @@ const ModalAddItem = (props) => {
}
-
+ {/* */}
setPerson(text.target.value)}
placeholder="For" />
-
+ {/* */}
setDetails(text.target.value)}
placeholder="Additional details" />
-
+ {/* */}
setFocusedTag(true)} onBlur={() => { setTimeout(() => { setFocusedTag(false) }, 100) }}
value={tag}
@@ -124,7 +123,7 @@ const ModalAddItem = (props) => {
tag.tagName)} text={tag} setElement={setTag} />
}
-
+ {/* */}
setPrice(text.target.value)}
diff --git a/src/components/modals/groceries/ModalAddList.js b/src/components/modals/groceries/ModalAddList.js
index 3971435..0fa68ed 100644
--- a/src/components/modals/groceries/ModalAddList.js
+++ b/src/components/modals/groceries/ModalAddList.js
@@ -26,7 +26,7 @@ const ModalAddList = (props) => {
}
}
return (
-
+
Add a grocery list
{
onChange={(text) => setListName(text.target.value)}
// onKeyDown={(event) => handleKeyDown(event)}
placeholder="List name" />
- {listName ? : }
+ {/* {listName ? : } */}
{
}
}
return (
-
+
Add product
-
+ {/* */}
setProductName(text.target.value)}
// onKeyDown={(event) => handleKeyDown(event)}
placeholder="Product name" />
- {productName ? : }
+ {/* {productName ? : } */}
-
+ {/* */}
setFocused(true)} onBlur={() => { setTimeout(() => { setFocused(false) }, 100) }}
type="text"
value={tag}
onChange={(text) => setTag(text.target.value)}
placeholder="Tag" />
- {tag ? : }
+ {/* {tag ? : } */}
{focused &&
tag.tagName)} text={tag} setElement={setTag} />
}
-
+ {/* */}
setPrice(text.target.value)}
placeholder="Price" />
-
+ {/* */}
setImage(text.target.value)}
diff --git a/src/components/modals/groceries/ModalEditItem.js b/src/components/modals/groceries/ModalEditItem.js
index 01195b6..dea57a3 100644
--- a/src/components/modals/groceries/ModalEditItem.js
+++ b/src/components/modals/groceries/ModalEditItem.js
@@ -61,7 +61,7 @@ const ModalEditItem = (props) => {
props.setVisible(false)
}
return (
-
+
{product && product.image && }
@@ -70,26 +70,26 @@ const ModalEditItem = (props) => {
-
+ {/* */}
setFocusedProduct(true)} onBlur={() => { setTimeout(() => { setFocusedProduct(false) }, 100) }}
type="text"
value={productName}
onChange={(text) => setProductName(text.target.value)}
// onKeyDown={(event) => handleKeyDown(event)}
placeholder="Product name" />
- {productName ? : }
+ {/* {productName ? : } */}
{focusedProduct &&
product.productName)} text={productName} setElement={handleDropdownPress} />
}
-
+ {/* */}
setAmount(text.target.value)}
placeholder="Amount" />
- {amount ? : }
+ {/* {amount ? : } */}
setFocusedQt(true)} onBlur={() => { setTimeout(() => { setFocusedQt(false) }, 100) }}
type="text"
@@ -101,21 +101,21 @@ const ModalEditItem = (props) => {
}
-
+ {/* */}
setPerson(text.target.value)}
placeholder="For" />
-
+ {/* */}
setDetails(text.target.value)}
placeholder="Additional details" />
-
+ {/* */}
setFocusedTag(true)} onBlur={() => { setTimeout(() => { setFocusedTag(false) }, 100) }}
value={tag}
@@ -126,7 +126,7 @@ const ModalEditItem = (props) => {
t.tagName)} text={tag} setElement={setTag} />
}
-
+ {/* */}
setPrice(text.target.value)}
diff --git a/src/components/modals/groceries/ModalEditList.js b/src/components/modals/groceries/ModalEditList.js
index 1a95106..0ee35af 100644
--- a/src/components/modals/groceries/ModalEditList.js
+++ b/src/components/modals/groceries/ModalEditList.js
@@ -23,7 +23,7 @@ const ModalEditList = (props) => {
}
}
return (
- props.setVisible(false)} animation={false}>
+ props.setVisible(false)}>
Edit the list
{
props.setVisible(false)
}
return (
-
+
{image && }
@@ -55,35 +55,35 @@ const ModalEditProduct = (props) => {
-
+ {/* */}
setProductName(text.target.value)}
// onKeyDown={(event) => handleKeyDown(event)}
placeholder="Product name" />
- {productName ? : }
+ {/* {productName ? : } */}
-
+ {/* */}
setFocused(true)} onBlur={() => { setTimeout(() => { setFocused(false) }, 100) }}
type="text"
value={tag}
onChange={(text) => setTag(text.target.value)}
placeholder="Tag" />
- {tag ? : }
+ {/* {tag ? : } */}
{focused &&
tag.tagName)} text={tag} setElement={setTag} />
}
-
+ {/* */}
setPrice(text.target.value)}
placeholder="Price" />
-
+ {/* */}
setImage(text.target.value)}
diff --git a/src/components/modals/recipes/ModalAddIngredients.js b/src/components/modals/recipes/ModalAddIngredients.js
index 292ff77..eee9288 100644
--- a/src/components/modals/recipes/ModalAddIngredients.js
+++ b/src/components/modals/recipes/ModalAddIngredients.js
@@ -62,11 +62,11 @@ const ModalAddIngredients = (props) => {
}
}
return (
-
+
Add to grocerylist
Choose a grocery list and select the ingredients you would like to add to it
-
+ {/* */}
{
onChange={(text) => setListName(text.target.value)}
onFocus={() => setFocused(true)} onBlur={() => { setTimeout(() => { setFocused(false) }, 100) }}
placeholder="Grocery list" />
- {listName ? : }
+ {/* {listName ? : } */}
{focused &&
list.listName)} text={listName} setElement={setListName} />
}
-
+ {/* */}
{
return (
// < Link to="/recipes/addRecipe">
-
+ {/* */}
//
)
@@ -24,7 +24,7 @@ export const AddIngredientsButton = (props) => {
const [visible, setVisible] = useState(false)
return (<>
setVisible(true)}>
-
+ {/* */}
setVisible(false)} />
>
@@ -41,9 +41,9 @@ export const OptionsButtonRecipe = (props) => {
}
return (
- setToggled(!toggled)} />
+ {/* setToggled(!toggled)} /> */}
- handleRemove()} />
+ {/* handleRemove()} /> */}
{/* history.push("/recipes/addRecipe/" + props.id)} /> */}
diff --git a/src/components/recipes/addRecipe/Ingredient.js b/src/components/recipes/addRecipe/Ingredient.js
index 05ef14c..0f75500 100644
--- a/src/components/recipes/addRecipe/Ingredient.js
+++ b/src/components/recipes/addRecipe/Ingredient.js
@@ -15,8 +15,8 @@ export const Ingredient = (props) => {
{ingredient.productName}
{ingredient.amount*multiplier}
- {props.EditIngredient && props.EditIngredient(props.index)} />}
- {props.RemoveIngredient && props.RemoveIngredient(props.index)} />}
+ {/* {props.EditIngredient && props.EditIngredient(props.index)} />} */}
+ {/* {props.RemoveIngredient && props.RemoveIngredient(props.index)} />} */}
)
}
\ No newline at end of file
diff --git a/src/components/recipes/addRecipe/styles/ingredient.js b/src/components/recipes/addRecipe/styles/ingredient.js
index 8afc44b..f1e7e38 100644
--- a/src/components/recipes/addRecipe/styles/ingredient.js
+++ b/src/components/recipes/addRecipe/styles/ingredient.js
@@ -29,22 +29,22 @@ export const IngredientName = styled(Text)`
margin-left: 10px;
width: 60%;
font-size: ${({ theme }) => theme.fontSize.fontS};
-overflow-wrap: break-word;
+/* overflow-wrap: break-word; */
color: ${props => props.theme.colors.textW4};
`
export const IngredientPortion = styled(Text)`
width: 35%;
font-size: ${({ theme }) => theme.fontSize.fontS};
font-weight: 900;
-word-break: break-all;
-overflow-wrap: break-word;
+/* word-break: break-all; */
+/* overflow-wrap: break-word; */
color: ${props => props.theme.colors.textW5};
`
export const IngredientAmount = styled(Text)`
max-width: 12%;
margin-right: 48px;
font-size: ${({theme}) => theme.fontSize.fontS};
-overflow-wrap: break-word;
+/* overflow-wrap: break-word; */
color: ${props => props.theme.colors.textW5};
`
export const IconRemove = styled(GoTrashcan)`
diff --git a/src/pages/HomePage.js b/src/pages/HomePage.js
index bb34c03..653a664 100644
--- a/src/pages/HomePage.js
+++ b/src/pages/HomePage.js
@@ -1,5 +1,5 @@
import React from 'react'
-import { View } from 'react-native'
+import { ScrollView, View } from 'react-native'
import HeaderPadding from '../components/Header'
//components
@@ -13,7 +13,7 @@ import { Wrapper, WrapperBoard, WrapperRight, WrapperLeft } from './styles/HomeP
const HomePage = () => {
return (
-
+
@@ -25,7 +25,7 @@ const HomePage = () => {
-
+
)
}
diff --git a/src/pages/groceryList/GroceryListPage.js b/src/pages/groceryList/GroceryListPage.js
index 3d5b2b1..6d82974 100644
--- a/src/pages/groceryList/GroceryListPage.js
+++ b/src/pages/groceryList/GroceryListPage.js
@@ -13,7 +13,7 @@ const GroceryListPage = () => {
{
currentTab === "Groceries" ? :
}
-
+ {/* */}
)
}
diff --git a/src/pages/recipes/AddRecipe.js b/src/pages/recipes/AddRecipe.js
index 643c0f5..674c1dd 100644
--- a/src/pages/recipes/AddRecipe.js
+++ b/src/pages/recipes/AddRecipe.js
@@ -70,7 +70,7 @@ const AddRecipe = () => {
{image && }
-
+ {/* */}
{
placeholder="Recipe name" />
-
+ {/* */}
setPrepTime(text.target.value)}
placeholder="Prep time (min)" />
-
+ {/* */}
{
placeholder="Servings" />
-
+ {/* */}
{
{recipe.prepTime !== 0 && recipe.prepTime && <>
-
+ {/* */}
READY IN:
{recipe.prepTime}
@@ -45,7 +45,7 @@ const Recipe = () => {
{recipe.servings !== 0 && recipe.servings && <>
-
+ {/* */}
{recipe.servings}
servings
diff --git a/src/styles/componentBlueprints.js b/src/styles/componentBlueprints.js
index c38c21f..2329d66 100644
--- a/src/styles/componentBlueprints.js
+++ b/src/styles/componentBlueprints.js
@@ -3,7 +3,6 @@ import React from 'react'
import styled, { css } from 'styled-components'
//deps
import { HiCheck } from 'react-icons/hi'
-//anims
import LightenDarken from '../functions'
//standard button layout
@@ -31,9 +30,6 @@ const CheckButtonWrapper = styled(View)`
border-radius: 15px;
margin: 0px 5px ;
background-color: ${props => props.checked ? props.theme.colors.selected : props.theme.colors.buttonGrey};
- &:hover{
- background-color: ${props => props.checked ? props.theme.colors.selected : LightenDarken(props.theme.colors.buttonGrey, 5)}
- }
`
const IconCheck = styled(HiCheck)`
font-size: ${({ theme }) => theme.fontSize.fontL};
@@ -42,7 +38,7 @@ const IconCheck = styled(HiCheck)`
export const CheckButton = (props) => {
return (
-
+ {/* */}
)
}