Skip to content

Commit

Permalink
chore: 폴더 구조 setting
Browse files Browse the repository at this point in the history
- styled-component 세팅
- routing
- recoil
- react-query


#1
  • Loading branch information
leecr1215 committed Sep 26, 2022
1 parent 46171bc commit 63cd92b
Show file tree
Hide file tree
Showing 18 changed files with 428 additions and 139 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# file tree
filetree.txt
375 changes: 375 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@tanstack/react-query": "^4.6.1",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"recoil": "^0.7.5",
"styled-components": "^5.3.5",
"web-vitals": "^2.1.4"
},
"scripts": {
Expand Down
Binary file removed public/favicon.ico
Binary file not shown.
35 changes: 3 additions & 32 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,13 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<meta name="description" content="oohub" />
<title>oohub</title>
</head>
<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`.
-->
<div id="modal-root"></divi>
</body>
</html>
Binary file removed public/logo192.png
Binary file not shown.
Binary file removed public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions public/robots.txt

This file was deleted.

38 changes: 0 additions & 38 deletions src/App.css

This file was deleted.

25 changes: 0 additions & 25 deletions src/App.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/App.test.js

This file was deleted.

3 changes: 3 additions & 0 deletions src/atom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { atom } from "recoil";

export {};
33 changes: 26 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import React from "react";
import ReactDOM from "react-dom/client";
import { ThemeProvider } from "styled-components";
import { RecoilRoot } from "recoil";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import Router from "./router";
import theme from "./theme";
import GlobalStyles from "./globalStyles";
import reportWebVitals from "./reportWebVitals";

const root = ReactDOM.createRoot(document.getElementById('root'));
const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
},
},
});

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<React.StrictMode>
<App />
<QueryClientProvider client={queryClient}>
<RecoilRoot>
<ThemeProvider theme={theme}>
<GlobalStyles />
<Router />
</ThemeProvider>
</RecoilRoot>
</QueryClientProvider>
</React.StrictMode>
);

Expand Down
1 change: 0 additions & 1 deletion src/logo.svg

This file was deleted.

14 changes: 14 additions & 0 deletions src/router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import Header from "./components/organisms/header";

const Router = () => {
return (
<BrowserRouter>
<Header />
<Routes></Routes>
</BrowserRouter>
);
};

export default Router;
Empty file added src/styles/globalStyles.js
Empty file.
Empty file added src/styles/theme.js
Empty file.

0 comments on commit 63cd92b

Please sign in to comment.