From b150d46d1b6f34c6c5391e6d15a2423296be577a Mon Sep 17 00:00:00 2001 From: Naian Date: Thu, 5 Jan 2023 09:38:33 -0300 Subject: [PATCH] feat: melhora estruturas das pastas --- desafio5/src/components/Header/header.module.css | 2 -- desafio5/src/index.tsx | 6 ++---- desafio5/src/pages/Home.tsx | 11 +++++++++++ desafio5/src/reportWebVitals.ts | 15 --------------- desafio5/src/setupTests.ts | 5 ----- 5 files changed, 13 insertions(+), 26 deletions(-) create mode 100644 desafio5/src/pages/Home.tsx delete mode 100644 desafio5/src/reportWebVitals.ts delete mode 100644 desafio5/src/setupTests.ts diff --git a/desafio5/src/components/Header/header.module.css b/desafio5/src/components/Header/header.module.css index 3ae4205..3e235a6 100644 --- a/desafio5/src/components/Header/header.module.css +++ b/desafio5/src/components/Header/header.module.css @@ -32,8 +32,6 @@ color: #c6c6c6; } - - .lupa-img { height: 18px; margin: 7px 16px 7px 10px; diff --git a/desafio5/src/index.tsx b/desafio5/src/index.tsx index c6200d0..0d2b7de 100644 --- a/desafio5/src/index.tsx +++ b/desafio5/src/index.tsx @@ -1,19 +1,17 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; +import { Home } from './pages/Home'; import './style/index.css'; -import Header from "./components/Header/Header"; -import reportWebVitals from './reportWebVitals'; const root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement ); root.render( -
+ ); // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/desafio5/src/pages/Home.tsx b/desafio5/src/pages/Home.tsx new file mode 100644 index 0000000..1c93922 --- /dev/null +++ b/desafio5/src/pages/Home.tsx @@ -0,0 +1,11 @@ +import React from "react"; +import Header from "../components/Header/Header"; + + +const Home = () => { + return ( +
+ ) +} + +export {Home}; \ No newline at end of file diff --git a/desafio5/src/reportWebVitals.ts b/desafio5/src/reportWebVitals.ts deleted file mode 100644 index 49a2a16..0000000 --- a/desafio5/src/reportWebVitals.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ReportHandler } from 'web-vitals'; - -const reportWebVitals = (onPerfEntry?: ReportHandler) => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals; diff --git a/desafio5/src/setupTests.ts b/desafio5/src/setupTests.ts deleted file mode 100644 index 8f2609b..0000000 --- a/desafio5/src/setupTests.ts +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom';