From 962799259d34b6c4bb6b853b52b5fd4b96dc1f43 Mon Sep 17 00:00:00 2001 From: w3bdesign <45217974+w3bdesign@users.noreply.github.com> Date: Wed, 2 Feb 2022 22:13:52 +0100 Subject: [PATCH 1/4] Refactor --- components/SVG/SVGCloseX.component.jsx | 104 ++++++++++++------------- components/SVG/SVGX.component.jsx | 46 +++++------ pages/_app.js | 20 ++--- pages/handlekurv.js | 16 ++-- pages/index.js | 18 ++--- 5 files changed, 94 insertions(+), 110 deletions(-) diff --git a/components/SVG/SVGCloseX.component.jsx b/components/SVG/SVGCloseX.component.jsx index 61cddc3ad..5661f92ff 100644 --- a/components/SVG/SVGCloseX.component.jsx +++ b/components/SVG/SVGCloseX.component.jsx @@ -1,59 +1,55 @@ /** * The SVG that we display to close the cart or the mobile search */ -const SVGCloseX = ({ setisExpanded }) => { - return ( - <> - { - setisExpanded(false); - }} - > - - - - - - - - - ); -}; +const SVGCloseX = ({ setisExpanded }) => ( + { + setisExpanded(false); + }} + > + + + + + + + +); export default SVGCloseX; diff --git a/components/SVG/SVGX.component.jsx b/components/SVG/SVGX.component.jsx index 44e456f4c..0b3bf366c 100644 --- a/components/SVG/SVGX.component.jsx +++ b/components/SVG/SVGX.component.jsx @@ -2,30 +2,26 @@ * The SVG that we display inside of the cart to remove items */ -const SVGX = ({ cartKey, products, handleRemoveProductClick }) => { - return ( - <> - { - handleRemoveProductClick(event, cartKey, products); - }} - > - - - - - ); -}; +const SVGX = ({ cartKey, products, handleRemoveProductClick }) => ( + { + handleRemoveProductClick(event, cartKey, products); + }} + > + + + +); export default SVGX; diff --git a/pages/_app.js b/pages/_app.js index e86a7baa5..b5997013f 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -16,17 +16,13 @@ Router.events.on('routeChangeStart', () => NProgress.start()); Router.events.on('routeChangeComplete', () => NProgress.done()); Router.events.on('routeChangeError', () => NProgress.done()); -const App = ({ Component, pageProps }) => { - return ( - <> - - - -