From 730cfad494809af08c1e3cb51c4bd0ab1373f4b7 Mon Sep 17 00:00:00 2001 From: korkt-kim Date: Tue, 2 Nov 2021 21:13:12 +0900 Subject: [PATCH] cleancode psuedo --- .gitignore | 23 - README.md | 70 - cleancode/overview/after.js | 49 + cleancode/overview/before.js | 41 + .../after1 notanswer.js" | 50 + .../after2.js" | 39 + .../before.js" | 26 + .../after.js" | 3 + .../before.js" | 9 + .../after.js" | 5 + .../before.js" | 6 + .../after.js" | 11 + .../before.js" | 21 + .../aflter.js" | 13 + .../before.js" | 13 + package.json | 38 - public/favicon.ico | Bin 3870 -> 0 bytes public/index.html | 43 - public/logo192.png | Bin 5347 -> 0 bytes public/logo512.png | Bin 9664 -> 0 bytes public/manifest.json | 25 - public/robots.txt | 3 - src/App.css | 38 - src/App.js | 25 - src/App.test.js | 8 - src/index.css | 13 - src/index.js | 17 - src/logo.svg | 1 - src/reportWebVitals.js | 13 - src/setupTests.js | 5 - yarn.lock | 11465 ---------------- 31 files changed, 286 insertions(+), 11787 deletions(-) delete mode 100644 .gitignore delete mode 100644 README.md create mode 100644 cleancode/overview/after.js create mode 100644 cleancode/overview/before.js create mode 100644 "cleancode/\354\235\221\354\247\221\353\217\204/after1 notanswer.js" create mode 100644 "cleancode/\354\235\221\354\247\221\353\217\204/after2.js" create mode 100644 "cleancode/\354\235\221\354\247\221\353\217\204/before.js" create mode 100644 "cleancode/\354\266\224\354\203\201\355\231\224/after.js" create mode 100644 "cleancode/\354\266\224\354\203\201\355\231\224/before.js" create mode 100644 "cleancode/\354\273\264\355\217\254\353\204\214\355\212\270\353\213\250\354\235\274\354\261\205\354\236\2041/after.js" create mode 100644 "cleancode/\354\273\264\355\217\254\353\204\214\355\212\270\353\213\250\354\235\274\354\261\205\354\236\2041/before.js" create mode 100644 "cleancode/\354\273\264\355\217\254\353\204\214\355\212\270\353\213\250\354\235\274\354\261\205\354\236\2042/after.js" create mode 100644 "cleancode/\354\273\264\355\217\254\353\204\214\355\212\270\353\213\250\354\235\274\354\261\205\354\236\2042/before.js" create mode 100644 "cleancode/\355\225\250\354\210\230\353\213\250\354\235\274\354\261\205\354\236\204/aflter.js" create mode 100644 "cleancode/\355\225\250\354\210\230\353\213\250\354\235\274\354\261\205\354\236\204/before.js" delete mode 100644 package.json delete mode 100644 public/favicon.ico delete mode 100644 public/index.html delete mode 100644 public/logo192.png delete mode 100644 public/logo512.png delete mode 100644 public/manifest.json delete mode 100644 public/robots.txt delete mode 100644 src/App.css delete mode 100644 src/App.js delete mode 100644 src/App.test.js delete mode 100644 src/index.css delete mode 100644 src/index.js delete mode 100644 src/logo.svg delete mode 100644 src/reportWebVitals.js delete mode 100644 src/setupTests.js delete mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 4d29575..0000000 --- a/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/README.md b/README.md deleted file mode 100644 index 02aac3f..0000000 --- a/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# Getting Started with Create React App - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `yarn start` - -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -The page will reload if you make edits.\ -You will also see any lint errors in the console. - -### `yarn test` - -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `yarn build` - -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `yarn eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). - -### Code Splitting - -This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) - -### Analyzing the Bundle Size - -This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) - -### Making a Progressive Web App - -This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) - -### Advanced Configuration - -This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) - -### Deployment - -This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) - -### `yarn build` fails to minify - -This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) diff --git a/cleancode/overview/after.js b/cleancode/overview/after.js new file mode 100644 index 0000000..851bc9d --- /dev/null +++ b/cleancode/overview/after.js @@ -0,0 +1,49 @@ +import {useState,useEffect} from 'react'; + +const useFetch = async () =>{ + // eslint-disable-next-line react-hooks/rules-of-hooks + const 연결전문가 = await 연결전문가_받아오기(); + return 연결전문가 + +} + +function QuestionPage(){ + const 연결전문가 = useFetch(); // 처음 켰을때 실행 + + async function handleNewExpertQuestionSubmit(){ + await 질문전송(questionValue); + alert("질문이 들어왔어요"); + } + + async function handleMyExpertQuestionSubmit(){ + await 연결전문가_질문전송(questionValue, 연결전문가.id); + alert(`${연결전문가.name}에게 질문이 등록되었어요.`) + } + + return ( +
+
+