From 97a8ba8e97bb5bc556970ef3aa9edd8f26de7ebc Mon Sep 17 00:00:00 2001 From: sjsjsj1246 Date: Wed, 10 Aug 2022 02:11:18 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8=20?= =?UTF-8?q?=EA=B8=B0=EB=B3=B8=20=EA=B5=AC=EC=84=B1=20#1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 14 ++++---------- src/App.test.tsx | 10 ++++------ src/App.tsx | 33 ++++++++++++++------------------- src/index.tsx | 24 +++++++++++------------- src/logo.svg | 1 - src/reportWebVitals.ts | 15 --------------- 6 files changed, 33 insertions(+), 64 deletions(-) delete mode 100644 src/logo.svg delete mode 100644 src/reportWebVitals.ts diff --git a/public/index.html b/public/index.html index aa069f2..cad1b45 100644 --- a/public/index.html +++ b/public/index.html @@ -3,6 +3,10 @@ +
- diff --git a/src/App.test.tsx b/src/App.test.tsx index 2a68616..7fab91d 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -1,9 +1,7 @@ -import React from 'react'; -import { render, screen } from '@testing-library/react'; -import App from './App'; +import React from "react"; +import { render, screen } from "@testing-library/react"; +import App from "./App"; -test('renders learn react link', () => { +test("renders App", () => { render(); - const linkElement = screen.getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); }); diff --git a/src/App.tsx b/src/App.tsx index a53698a..f074e63 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,25 +1,20 @@ -import React from 'react'; -import logo from './logo.svg'; -import './App.css'; +import React from "react"; +import logo from "./logo.svg"; +import "./App.css"; +import { AppBar, Box, Divider, Drawer, List, Toolbar } from "@mui/material"; +import { BrowserRouter, Route, Routes } from "react-router-dom"; +import Main from "./pages/Main"; +import MainLayout from "./layouts/MainLayout"; function App() { return ( -
-
- logo -

- Edit src/App.tsx and save to reload. -

- - Learn React - -
-
+ + + }> + } /> + + + ); } diff --git a/src/index.tsx b/src/index.tsx index 032464f..e6ce5bf 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,19 +1,17 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; -import './index.css'; -import App from './App'; -import reportWebVitals from './reportWebVitals'; +import ReactDOM from "react-dom/client"; +import "./index.css"; +import App from "./App"; +import { createTheme, CssBaseline, ThemeProvider } from "@mui/material"; const root = ReactDOM.createRoot( - document.getElementById('root') as HTMLElement + document.getElementById("root") as HTMLElement ); + +const theme = createTheme(); + 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/src/logo.svg b/src/logo.svg deleted file mode 100644 index 9dfc1c0..0000000 --- a/src/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/reportWebVitals.ts b/src/reportWebVitals.ts deleted file mode 100644 index 49a2a16..0000000 --- a/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;