From 1e94592641b10d6c6fcecf18882d13b6010bfaba Mon Sep 17 00:00:00 2001 From: Kakabay Date: Wed, 2 Nov 2022 18:37:58 +0500 Subject: [PATCH] api class --- index.html | 2 +- src/components/Header.jsx | 28 +++++++------- src/helpers/api.js | 78 +++++++++++++++++++++++++++++++++++++++ src/pages/Finance.jsx | 4 ++ src/pages/Home.jsx | 6 ++- src/pages/Normative.jsx | 7 ++++ 6 files changed, 109 insertions(+), 16 deletions(-) create mode 100644 src/helpers/api.js diff --git a/index.html b/index.html index 79c4701..2e89745 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - Vite + React + Exchange
diff --git a/src/components/Header.jsx b/src/components/Header.jsx index c0fc36b..c323c26 100644 --- a/src/components/Header.jsx +++ b/src/components/Header.jsx @@ -5,14 +5,14 @@ import { Link } from 'react-router-dom'; import logo from '../assets/icons/logo.svg'; import burger from '../assets/icons/burger.svg'; import { ReactComponent as Close } from '../assets/icons/close.svg'; -import { useState } from 'react'; +import { useState, useEffect } from 'react'; const Header = () => { // States const [navActive, setNavActive] = useState(false); - + const [data, setData] = useState(); // Functions - const togleNav = () => { + const toggleNav = () => { setNavActive(!navActive); }; @@ -82,7 +82,7 @@ const Header = () => { logo -
+
@@ -90,35 +90,35 @@ const Header = () => {