From b34cdba24fe2c2b445adcb3cf7c3e65e79ff6fd0 Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Fri, 26 Mar 2021 21:38:05 +0530 Subject: first commit, doesn't do anything yet --- src/App.css | 38 -------------------------------------- src/App.js | 25 ------------------------- src/App.test.js | 8 -------- src/components/App.js | 10 ++++++++++ src/components/Header.js | 13 +++++++++++++ src/index.css | 13 ------------- src/index.js | 26 ++++++++++++++++---------- src/reportWebVitals.js | 13 ------------- src/setupTests.js | 5 ----- src/styles/header.scss | 5 +++++ 10 files changed, 44 insertions(+), 112 deletions(-) delete mode 100644 src/App.css delete mode 100644 src/App.js delete mode 100644 src/App.test.js create mode 100644 src/components/App.js create mode 100644 src/components/Header.js delete mode 100644 src/index.css delete mode 100644 src/reportWebVitals.js delete mode 100644 src/setupTests.js create mode 100644 src/styles/header.scss (limited to 'src') diff --git a/src/App.css b/src/App.css deleted file mode 100644 index 74b5e05..0000000 --- a/src/App.css +++ /dev/null @@ -1,38 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/src/App.js b/src/App.js deleted file mode 100644 index 3784575..0000000 --- a/src/App.js +++ /dev/null @@ -1,25 +0,0 @@ -import logo from './logo.svg'; -import './App.css'; - -function App() { - return ( -
-
- logo -

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

- - Learn React - -
-
- ); -} - -export default App; diff --git a/src/App.test.js b/src/App.test.js deleted file mode 100644 index 1f03afe..0000000 --- a/src/App.test.js +++ /dev/null @@ -1,8 +0,0 @@ -import { render, screen } from '@testing-library/react'; -import App from './App'; - -test('renders learn react link', () => { - render(); - const linkElement = screen.getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); diff --git a/src/components/App.js b/src/components/App.js new file mode 100644 index 0000000..666667b --- /dev/null +++ b/src/components/App.js @@ -0,0 +1,10 @@ +import React from "react"; + +const App = () => { + const txt = "sldjflksjdfljsd"; + return ( +

{txt}

+ ) +} + +export default App diff --git a/src/components/Header.js b/src/components/Header.js new file mode 100644 index 0000000..ecc2b42 --- /dev/null +++ b/src/components/Header.js @@ -0,0 +1,13 @@ +import React from "react"; +// import React, { useState } from "react"; + +const App = () => { + // const [activeLink, updateActiveLink] = useState("home") + return ( +
+ +
+ ) +} + +export default App diff --git a/src/index.css b/src/index.css deleted file mode 100644 index ec2585e..0000000 --- a/src/index.css +++ /dev/null @@ -1,13 +0,0 @@ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -} diff --git a/src/index.js b/src/index.js index ef2edf8..4593486 100644 --- a/src/index.js +++ b/src/index.js @@ -1,17 +1,23 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import './index.css'; -import App from './App'; -import reportWebVitals from './reportWebVitals'; +import App from "./components/App"; -ReactDOM.render( - - - , - document.getElementById('root') -); +ReactDOM.render(App(), document.getElementById("root")) + + +// auto generated code +// import './index.css'; +// import App from './App'; +// import reportWebVitals from './reportWebVitals'; + +// ReactDOM.render( +// +// +// , +// document.getElementById('root') +// ); // 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(); +//reportWebVitals(); diff --git a/src/reportWebVitals.js b/src/reportWebVitals.js deleted file mode 100644 index 5253d3a..0000000 --- a/src/reportWebVitals.js +++ /dev/null @@ -1,13 +0,0 @@ -const reportWebVitals = onPerfEntry => { - 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/src/setupTests.js b/src/setupTests.js deleted file mode 100644 index 8f2609b..0000000 --- a/src/setupTests.js +++ /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'; diff --git a/src/styles/header.scss b/src/styles/header.scss new file mode 100644 index 0000000..5071b5e --- /dev/null +++ b/src/styles/header.scss @@ -0,0 +1,5 @@ +$bgColor: lightgray; + +#header { + background-color: $bgColor; +} -- cgit v1.2.3