Skip to content

Commit

Permalink
removed unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
premell committed Sep 25, 2021
1 parent d7c53b2 commit 4522756
Show file tree
Hide file tree
Showing 31 changed files with 1 addition and 11,728 deletions.
5 changes: 0 additions & 5 deletions boxes/package.json

This file was deleted.

11,172 changes: 0 additions & 11,172 deletions boxes/yarn.lock

This file was deleted.

3 changes: 0 additions & 3 deletions components/Cart/Main/PokemonList/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import PokemonCard from "./PokemonCard";
import * as S from "./Styles";

const PokemonList = ({ cartPokemon }) => {
//const { removePokemonFromCart } = useCart();
//handleDeleteClick={() => removePokemonFromCart(cartPokemon)}

return (
<>
<S.PokemonList>
Expand Down
1 change: 0 additions & 1 deletion components/Cart/RecommendedPokemon/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const RecommendedPokemon = ({ cartPokemon, favoritePokemon }) => {
useEffect(() => {
setWindowWidth(window.innerWidth);
const pokemonOnScreen = Math.max(Math.min(windowWidth - 200, 1300) / 270);
console.log(pokemonOnScreen);
setPokemonToRight(
filteredAlreadyInCart.length - (pokemonOnScreen - viewPosition) + 1
);
Expand Down
2 changes: 0 additions & 2 deletions components/Cart/Styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,3 @@ export const HeartContainer = styled.div`
top: 10px;
z-index: 300;
`;

//RECOMMENDED SECTION
3 changes: 0 additions & 3 deletions components/Home/Main/FilterPanel/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,5 @@ const FilterPanel = () => {
</S.FilterContainer>
);
};
// <FilterBox key={key}><NumberFilterFlair min={statsFilter[key].currentRange.min}
// max={statsFilter[key].currentRange.max} name={statsFilter[key].name} /> <Cross handleClick={() => removeStat(key)} /></FilterBox>
// )

export default FilterPanel;
2 changes: 0 additions & 2 deletions components/Home/Main/PokemonList/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,9 @@ const PokemonList = ({ allPokemon }) => {

useEffect(() => {
if (firstRun.current) {
console.log("NOPE");
firstRun.current = false;
return;
}
console.log("HEJSAN");
setCurrentPage(1);
window.scrollTo(0, 0);
}, [numberOfMatchedPokemon, sortingMethod, pokemonPerPage]);
Expand Down
311 changes: 0 additions & 311 deletions components/Home/Main/Styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import { useEffect, useRef, useState } from "react";

import Portal from "components/Portal";

//overflow: hidden;

const OuterContainer = styled.div`
flex: 1 1 auto;
max-width: 1650px;
Expand Down Expand Up @@ -162,318 +160,9 @@ export const ScrollToTopButton = styled.div`
background-color: ${(p) => p.theme.colors.dark_accent_color};
}
`;
//position: sticky;

export const HeartContainer = styled.div`
position: absolute;
right: 15px;
top: 15px;
`;

// import styled, { css } from "styled-components"
//
// import { formatAsUSDWithoutTrailingZeros } from "shared/javascript"
//
// import { RegularText, BoldRegularText } from "shared/components"
// import { AiOutlineClose } from "react-icons/ai"
// import { RiArrowDropDownLine } from "react-icons/ri"
// import { IoIosArrowForward, IoIosArrowBack } from "react-icons/io"
//
// import { useClickOutside } from "shared/hooks"
// import { useEffect, useRef, useState } from "react"
//
// const StyledContainer = styled.div`
// width: 95%;
// height: 100%;
// display: flex;
// flex-direction:column;
// padding: 10px;
// `
// const OuterContainer = styled.div`
// width:100%;
// display:flex;
// justify-content:flex-start;
// background-color: ${p => p.theme.colors.gray_10};
// `
//
// export const Container = ({ children }) => {
//
// return (
// <OuterContainer>
// <StyledContainer >
// {children}
// </StyledContainer >
// </OuterContainer>
// )
//
// }
//
// export const PokemonContainer = styled.div`
// min-height:800px;
// width: 100%;
// height: 100%;
// display: flex;
// flex-wrap:wrap;
// `
//
// export const StyledPokemonCard = styled.div`
// display:flex;
// flex-direction: column;
// align-items:center;
// width: 300px;
// height: 330px;
// background-color: ${p => p.theme.colors.gray_0};
// margin: 0px 12px 12px 0px;
// border-radius:12px;
//
// `
// const StyledFilterBox = styled.div`
// display: flex;
// height: 30px;
// align-items:center;
// justify-content:center;
// margin: 8px 8px 0px 0px;
// background-color: ${p => p.theme.colors.gray_20};
// padding: 6px 8px 6px 12px;
// border-radius:4px;
// box-sizing:border-box;
//
// cursor:pointer;
// &:hover{
// background-color: ${p => p.theme.colors.gray_40};
// }
// `
//
// export const FilterBox = ({ handleClick, text }) => {
//
// return (
// <StyledFilterBox onClick={handleClick}>
// <p style={{ position: "relative" }}>
// {text}
// </p>
// <p>
// <Cross />
// </p>
// </StyledFilterBox>
// )
// }
//
// export const TypeFlairBox = styled.div`
// display: flex;
// `
//
// export const StyledPokemonMain = styled.div`
// cursor:pointer;
// display: flex;
// flex-direction:column;
// justify-content:center;
// align-items:center;
//
// &:hover img{
// transform: scale(1.15);
// }
// `
//
// const StyledCross = styled.p`
// margin-left:10px;
// display:flex;
// align-items:center;
// color: ${p => p.theme.colors.gray_80};
//
// `
//
// export const Cross = ({ handleClick }) => {
// return <StyledCross onClick={handleClick}><AiOutlineClose /></StyledCross>
//
// }
//
// const StyledPriceFilterFlair = styled.div`
// `
//
// export const PriceFilterFlair = ({ min, max }) => {
// return <RegularText style={{ margin: 0 }}>{`Price: ${formatAsUSDWithoutTrailingZeros(min)} - ${formatAsUSDWithoutTrailingZeros(max)}`}</RegularText>
// }
//
// export const NumberFilterFlair = ({ min, max, name }) => {
// return <StyledPriceFilterFlair style={{ margin: 0 }}><p>{`${name}: ${min} - ${max}`}</p></StyledPriceFilterFlair>
// }
//
// const StyledAbilityFilterFlair = styled.div`
//
// `
// export const AbilityFilterFlair = ({ ability }) => {
// return <StyledAbilityFilterFlair><p>{ability}</p></StyledAbilityFilterFlair>
// }
//
// const StyledPageArrow = styled.div`
//
// cursor:pointer;
//
// &:hover{
// background-color: ${p => p.theme.colors.gray_40};
// }
// `
//
// export const PrevPageArrow = ({ handleClick }) => {
// return (
// <StyledPageArrow onClick={handleClick}>
// <IoIosArrowBack />
// </StyledPageArrow>
// )
// }
// export const NextPageArrow = ({ handleClick }) => {
// return (
// <StyledPageArrow onClick={handleClick}>
// <IoIosArrowForward />
// </StyledPageArrow>
// )
// }
// export const PageNumber = styled.div`
// cursor:pointer;
// &:hover{
// background-color: ${p => p.theme.colors.gray_40};
// }
// background-color: ${p => p.isActive && p.theme.colors.accent_color};
// color: ${p => p.isActive && 'white'};
// margin: 0 8px;
// padding:8px;
// `
//
// export const PageNavigatorContainer = styled.div`
// width: 100%;
// height: 50px;
//
// display:flex;
// justify-content:center;
// align-items:center;
// `
//
// const DropdownItem = styled.div`
// display:flex;
// padding: 6px 12px;
// align-items:center;
// margin:0px;
// width:100%;
// height:32px;
// cursor:pointer;
// box-sizing:border-box;
//
// &:hover{
// background-color: ${p => p.inlist ? p.theme.colors.accent_color : p.theme.colors.gray_40}
// }
// `
//
// const DropdownList = styled.div`
// width:100%;
// top:32px;
// left:0px;
// position:absolute;
// background-color: ${p => p.theme.colors.gray_90};
// color:white;
// z-index:30;
// `
//
// export const Dropdown = ({ labelPrefix, defaultSelected, list, handleChange }) => {
// const [selected, setSelected] = useState({})
// const [showDropdown, setShowDropdown] = useState(false)
// const dropdown = useRef(null)
//
// const handleClickOutside = () => setShowDropdown(false)
// useClickOutside(dropdown, handleClickOutside)
//
// useEffect(() => {
//
// setSelected(defaultSelected)
// }, [defaultSelected])
//
//
// const handleNewSelected = (value) => {
// const newItem = list.find((item) => item.value === value)
//
// handleChange(newItem.value)
// setSelected(newItem)
// setShowDropdown(false)
// }
//
//
// return (
// <div style={{ marginLeft: "12px", position: "relative" }} ref={dropdown}>
// <DropdownItem onClick={() => setShowDropdown(!showDropdown)}><p>{labelPrefix}{selected.label}</p><RiArrowDropDownLine size={20} /></DropdownItem>
// <DropdownList>
// {showDropdown ? list.map((item) => <DropdownItem inlist key={item.label} onClick={() => handleNewSelected(item.value)}><p>{item.label}</p></DropdownItem>) : null}
// </DropdownList>
// </div>
// )
// }
//
// export const StyledFilterContainer = styled.div`
// display: flex;
// align-items:center;
// margin-bottom: 12px;
// `
//
// const StyledRemoveAllFilters = styled.div`
// cursor: pointer;
// margin: 8px 8px 0px 10px;
//
// box-sizing:border-box;
// transition: color 0.4s;
// transition: background-color 0.4s;
// padding: 0px 16px;
// height:30px;
// display:flex;
// align-items:center;
//
// border-radius: 4px;
// &:hover{
// background-color ${p => p.theme.colors.accent_color};
// color: white;
// }
// `
//
// export const RemoveAllFilters = ({ handleClick }) => {
//
//
// return (
// <StyledRemoveAllFilters onClick={handleClick}>
// <p>
// Clear all filters
// </p>
// </StyledRemoveAllFilters>
// )
// }
//
// export const ViewPanelContainer = styled.div`
// width:100%;
// display:flex;
// `
// export const DropdownContainer = styled.div`
// width:80%;
// display:flex;
// align-items:center;
// justify-content:flex-end;
//
// & *{
// }
//
// `
//
// const StyledNoPokemonFound = styled.div`
// width: 100%;
// height:800px;
// display:flex;
// align-items:center;
// justify-content:center;
// `
//
// export const NoPokemonFound = () => {
//
// return (
// <StyledNoPokemonFound>
// <h3>
// No pokemon were found
// </h3>
// </StyledNoPokemonFound>
// )
//
// }
Loading

0 comments on commit 4522756

Please sign in to comment.