Skip to content

Commit

Permalink
Feat: 프로젝트 기본 구성 #1
Browse files Browse the repository at this point in the history
  • Loading branch information
sjsjsj1246 committed Aug 9, 2022
1 parent ba3aa39 commit 97a8ba8
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 64 deletions.
14 changes: 4 additions & 10 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
Expand All @@ -29,15 +33,5 @@
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
10 changes: 4 additions & 6 deletions src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -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(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});
33 changes: 14 additions & 19 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.tsx</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
<BrowserRouter>
<Routes>
<Route path="/" element={<MainLayout />}>
<Route index element={<Main />} />
</Route>
</Routes>
</BrowserRouter>
);
}

Expand Down
24 changes: 11 additions & 13 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -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(
<React.StrictMode>
<ThemeProvider theme={theme}>
<CssBaseline />
<App />
</React.StrictMode>
</ThemeProvider>
);

// 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();
1 change: 0 additions & 1 deletion src/logo.svg

This file was deleted.

15 changes: 0 additions & 15 deletions src/reportWebVitals.ts

This file was deleted.

0 comments on commit 97a8ba8

Please sign in to comment.