From b72c3e01b1e57a444c32d2870162a6847f99c26e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A4=80=EC=84=B1?= <137983583+juncastle97@users.noreply.github.com> Date: Thu, 11 Jan 2024 21:20:56 +0900 Subject: [PATCH] =?UTF-8?q?[=EB=B0=95=EC=A4=80=EC=84=B1]=20Week7=20(#273)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: hover transition ease-out * feat: router 설치 * fix: api.js fetchProfile fetchLinks 사용 * feat:SharePage&FolderPage 나누기(커밋 누락) feat&stlye: AddLink 컴포넌트 생성 및 input css 구현 * Fix: AddLink Button을 input 오른쪽에 고정 * Fix: api 분리 * Refactor: Search & CardInput 컨포넌트 분리 * Feat: FolderPage api로 profile 가져오기 * Feat: Card 컴포넌트를 페이지별 분리 및 시간 기능 구현 * Feat: 케밥 버튼, 별 버튼 넣기 * Fix: 데이터 없을 때 수정 * Feat: Kebab Button 모달창 만들기 * Feat: 폴더 목록 누를 시 목록 이름 나오기 --- package-lock.json | 39 ++++ package.json | 1 + src/Main.js | 18 ++ src/api.js | 65 +++++- src/assets/delete.svg | 8 + src/assets/editimg.svg | 5 + src/assets/kebab.svg | 5 + src/assets/link.svg | 4 + src/assets/noneimg.svg | 13 ++ src/assets/shareimg.svg | 11 + src/assets/star.svg | 10 + src/components/AddLink.js | 14 ++ src/components/App.js | 17 -- src/components/Card-folder.js | 53 +++++ src/components/Card-shared.js | 51 +++++ src/components/Card.js | 19 -- src/components/CardInput-folder.js | 14 ++ src/components/CardInput-shared.js | 14 ++ src/components/FolderList.js | 44 ++++ src/components/Header-folder.js | 28 +++ .../{Header.js => Header-shared.js} | 23 +-- src/components/KebabModal.js | 13 ++ src/components/ListButton.js | 17 ++ src/components/Main.js | 38 ---- src/components/Search.js | 15 ++ src/components/Style.css | 190 +++++++++++++++++- src/components/Title.js | 26 +-- src/index.js | 4 +- src/pages/FolderPage.js | 54 +++++ src/pages/SharedPage.js | 51 +++++ src/time.js | 34 ++++ 31 files changed, 772 insertions(+), 126 deletions(-) create mode 100644 src/Main.js create mode 100644 src/assets/delete.svg create mode 100644 src/assets/editimg.svg create mode 100644 src/assets/kebab.svg create mode 100644 src/assets/link.svg create mode 100644 src/assets/noneimg.svg create mode 100644 src/assets/shareimg.svg create mode 100644 src/assets/star.svg create mode 100644 src/components/AddLink.js delete mode 100644 src/components/App.js create mode 100644 src/components/Card-folder.js create mode 100644 src/components/Card-shared.js delete mode 100644 src/components/Card.js create mode 100644 src/components/CardInput-folder.js create mode 100644 src/components/CardInput-shared.js create mode 100644 src/components/FolderList.js create mode 100644 src/components/Header-folder.js rename src/components/{Header.js => Header-shared.js} (51%) create mode 100644 src/components/KebabModal.js create mode 100644 src/components/ListButton.js delete mode 100644 src/components/Main.js create mode 100644 src/components/Search.js create mode 100644 src/pages/FolderPage.js create mode 100644 src/pages/SharedPage.js create mode 100644 src/time.js diff --git a/package-lock.json b/package-lock.json index a1e590ee6..07f62f2f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@testing-library/user-event": "^13.5.0", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-router-dom": "^6.20.1", "react-scripts": "5.0.1", "web-vitals": "^2.1.4" } @@ -3241,6 +3242,14 @@ } } }, + "node_modules/@remix-run/router": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.13.1.tgz", + "integrity": "sha512-so+DHzZKsoOcoXrILB4rqDkMDy7NLMErRdOxvzvOKb507YINKUP4Di+shbTZDhSE/pBZ+vr7XGIpcOO0VLSA+Q==", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -14671,6 +14680,36 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "6.20.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.20.1.tgz", + "integrity": "sha512-ccvLrB4QeT5DlaxSFFYi/KR8UMQ4fcD8zBcR71Zp1kaYTC5oJKYAp1cbavzGrogwxca+ubjkd7XjFZKBW8CxPA==", + "dependencies": { + "@remix-run/router": "1.13.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router-dom": { + "version": "6.20.1", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.20.1.tgz", + "integrity": "sha512-npzfPWcxfQN35psS7rJgi/EW0Gx6EsNjfdJSAk73U/HqMEJZ2k/8puxfwHFgDQhBGmS3+sjnGbMdMSV45axPQw==", + "dependencies": { + "@remix-run/router": "1.13.1", + "react-router": "6.20.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, "node_modules/react-scripts": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz", diff --git a/package.json b/package.json index 7ff0d6b58..38c6f3fa1 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "@testing-library/user-event": "^13.5.0", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-router-dom": "^6.20.1", "react-scripts": "5.0.1", "web-vitals": "^2.1.4" }, diff --git a/src/Main.js b/src/Main.js new file mode 100644 index 000000000..fe9a6fb1e --- /dev/null +++ b/src/Main.js @@ -0,0 +1,18 @@ +import { BrowserRouter, Routes, Route } from "react-router-dom"; +import SharedPage from "./pages/SharedPage"; +import FolderPage from "./pages/FolderPage"; +import Footer from "./components/Footer"; + +function Main() { + return ( + + + }/> + }/> + +