Skip to content

Commit

Permalink
♻️ chore: remove unused hooks/vars
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanoSaffran committed Sep 22, 2020
1 parent 1ad0705 commit b9ab703
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/components/Header/styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import styled, { css } from 'styled-components';
import { darken } from 'polished';

interface IBadgeProps {
hasProducts: number;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/ModalSearch/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState, useCallback } from 'react';
import React, { useEffect, useState } from 'react';
import { FiArrowLeft } from 'react-icons/fi';
import { FiSearch } from 'react-icons/fi';

Expand Down
4 changes: 1 addition & 3 deletions src/components/Modal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useState, useEffect, useContext } from 'react';
import { ThemeContext } from 'styled-components';
import React, { useState, useEffect } from 'react';
import ReactModal from 'react-modal';

interface IModalProps {
Expand All @@ -10,7 +9,6 @@ interface IModalProps {

const Modal: React.FC<IModalProps> = ({ children, isOpen, setIsOpen }) => {
const [modalStatus, setModalStatus] = useState(isOpen);
// const { title, colors } = useContext(ThemeContext);

useEffect(() => {
setModalStatus(isOpen);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Product/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useMemo } from 'react';
import React from 'react';

import { Link } from 'react-router-dom';
import { Container } from './styles';
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/cart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const CartProvider: React.FC = ({ children }) => {

if (!foundProduct) return 0;

const [_, value] = foundProduct?.price.split(' ');
const [, value] = foundProduct?.price.split(' ');
const subtotal = foundProduct?.quantity * Number(value.replace(',', '.'));
return subtotal;
},
Expand Down
1 change: 0 additions & 1 deletion src/pages/Details/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, {
useMemo,
useState,
useEffect,
useCallback,
Expand Down
2 changes: 1 addition & 1 deletion src/styles/global.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createGlobalStyle, css } from 'styled-components';
import { createGlobalStyle } from 'styled-components';

// import 'react-toggle/style.css';

Expand Down

0 comments on commit b9ab703

Please sign in to comment.