Skip to content

Commit

Permalink
Merge pull request #174 from boostcampwm-2024/frontend
Browse files Browse the repository at this point in the history
[FE][Feat] : ๋ฐฐํฌ๋ฅผ ์œ„ํ•œ ๋จธ์ง€
  • Loading branch information
happyhyep authored Nov 14, 2024
2 parents 6907ab5 + 2dde3d2 commit 6c5c6a5
Show file tree
Hide file tree
Showing 55 changed files with 2,060 additions and 176 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<p>
<a href="https://www.notion.so/127b1b2b649180e88f70d6a4648924a0?pvs=4">ํŒ€ ๋…ธ์…˜</a> |
<a href="https://github.com/boostcampwm-2024/web28-DDara/wiki">ํŒ€ ์œ„ํ‚ค</a> |
<a href="https://ddara-docs.vercel.app/">ํŒ€ ์œ„ํ‚ค</a> |
<a href="https://www.figma.com/design/r9nl4Jcz9VXIMbrpf50wY6/PickMeUp?node-id=90-1897">๊ธฐํš์„œ</a> |
<a href="https://www.figma.com/design/r9nl4Jcz9VXIMbrpf50wY6/PickMeUp?node-id=87-929">๋””์ž์ธ</a>
<!-- <br />
Expand Down
68 changes: 34 additions & 34 deletions backend/package.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
{
"name": "ddara-backend",
"private": true,
"workspaces": [
"frontend",
"backend"
],
"version": "0.0.0",
"type": "module",
"description": "๋”ฐ๋ผ๋”ฐ๋ผ์˜ ์„ ๋”ฐ๋ผ๊ธธ๋”ฐ๋ผ BackEnd ์ฝ”๋“œ",
"main": "index.js",
"scripts": {
"dev": "node src/index.js",
"test": "vitest",
"test:watch": "vitest --watch",
"test:coverage": "vitest run --coverage",
"lint": "pnpm lint-staged"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"bcrypt": "^5.1.1",
"dotenv": "^16.4.5",
"express": "^4.21.1",
"express-validator": "^7.2.0",
"jsonwebtoken": "^9.0.2",
"pg": "^8.13.1",
"swagger-jsdoc": "^6.2.8",
"swagger-ui-express": "^5.0.1",
"uuid": "^11.0.3",
"ws": "^8.11.0"
}
}
{
"name": "ddara-backend",
"private": true,
"workspaces": [
"frontend",
"backend"
],
"version": "0.0.0",
"type": "module",
"description": "๋”ฐ๋ผ๋”ฐ๋ผ์˜ ์„ ๋”ฐ๋ผ๊ธธ๋”ฐ๋ผ BackEnd ์ฝ”๋“œ",
"main": "index.js",
"scripts": {
"dev": "node src/index.js",
"test": "vitest",
"test:watch": "vitest --watch",
"test:coverage": "vitest run --coverage",
"lint": "pnpm lint-staged"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"bcrypt": "^5.1.1",
"dotenv": "^16.4.5",
"express": "^4.21.1",
"express-validator": "^7.2.0",
"jsonwebtoken": "^9.0.2",
"pg": "^8.13.1",
"swagger-jsdoc": "^6.2.8",
"swagger-ui-express": "^5.0.1",
"uuid": "^11.0.3",
"ws": "^8.11.0"
}
}
2 changes: 1 addition & 1 deletion docs/docusaurus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<p>
<a href="https://www.notion.so/127b1b2b649180e88f70d6a4648924a0?pvs=4">ํŒ€ ๋…ธ์…˜</a> |
<a href="https://github.com/boostcampwm-2024/web28-DDara/wiki">ํŒ€ ์œ„ํ‚ค</a> |
<a href="https://ddara-docs.vercel.app/">ํŒ€ ์œ„ํ‚ค</a> |
<a href="https://www.figma.com/design/r9nl4Jcz9VXIMbrpf50wY6/PickMeUp?node-id=90-1897">๊ธฐํš์„œ</a> |
<a href="https://www.figma.com/design/r9nl4Jcz9VXIMbrpf50wY6/PickMeUp?node-id=87-929">๋””์ž์ธ</a>
<!-- <br />
Expand Down
3 changes: 2 additions & 1 deletion docs/docusaurus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
"react-dom": "^18.0.0",
"react-player": "^2.16.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.6.1",
Expand Down
8 changes: 7 additions & 1 deletion docs/docusaurus/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": "."
"baseUrl": ".",
"paths": {
"@site/*": ["src/*"],
"@theme/*": ["src/theme/*"],
"@component/*": ["src/components/*"],
"@markdown/*": ["src/components/markdown/*"],
}
}
}
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ export default [
'prettier/prettier': 'error',
'no-underscore-dangle': 'warn',
'no-undef': 'off',
'arrow-body-style': 'off',
},
},

Expand Down
11 changes: 11 additions & 0 deletions frontend/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
import type { Preview } from '@storybook/react';
import '../src/index.css';
// ์šฐ์„ ์€ ํฐํŠธ ๋‹ค ํฌํ•จ์‹œ์ผฐ๋Š”๋ฐ, ๋‚˜์ค‘์— ์‚ฌ์šฉํ•  ๊ฒƒ๋“ค๋งŒ ๋”ฐ๋กœ ๋บด์ž.
import '@fontsource/pretendard/100.css';
import '@fontsource/pretendard/200.css';
import '@fontsource/pretendard/300.css';
import '@fontsource/pretendard/400.css';
import '@fontsource/pretendard/500.css';
import '@fontsource/pretendard/600.css';
import '@fontsource/pretendard/700.css';
import '@fontsource/pretendard/800.css';
import '@fontsource/pretendard/900.css';

const preview: Preview = {
parameters: {
Expand Down
125 changes: 64 additions & 61 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,61 +1,64 @@
{
"name": "ddara-frontend",
"private": true,
"workspaces": [
"frontend",
"backend"
],
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"test": "vitest",
"test:watch": "vitest --watch",
"test:coverage": "vitest run --coverage",
"lint": "pnpm lint-staged",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"dependencies": {
"@fontsource/pretendard": "^5.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@chromatic-com/storybook": "^3.2.2",
"@eslint/js": "^9.13.0",
"@storybook/addon-essentials": "^8.4.2",
"@storybook/addon-interactions": "^8.4.2",
"@storybook/addon-onboarding": "^8.4.2",
"@storybook/blocks": "^8.4.2",
"@storybook/react": "^8.4.2",
"@storybook/react-vite": "^8.4.2",
"@storybook/test": "^8.4.2",
"@types/navermaps": "^3.7.8",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react-swc": "^3.5.0",
"autoprefixer": "^10.4.20",
"classnames": "^2.5.1",
"eslint": "^9.13.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"eslint-plugin-storybook": "^0.11.0",
"globals": "^15.11.0",
"postcss": "^8.4.47",
"storybook": "^8.4.2",
"tailwindcss": "^3.4.14",
"typescript": "~5.6.2",
"typescript-eslint": "^8.11.0",
"vite": "^5.4.10",
"vite-tsconfig-paths": "^5.1.1"
},
"eslintConfig": {
"extends": [
"plugin:storybook/recommended"
]
}
}
{
"name": "ddara-frontend",
"private": true,
"workspaces": [
"frontend",
"backend"
],
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"test": "vitest",
"test:watch": "vitest --watch",
"test:coverage": "vitest run --coverage",
"lint": "pnpm lint-staged",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"dependencies": {
"@fontsource/pretendard": "^5.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-icons": "^5.3.0",
"react-router-dom": "^6.28.0"
},
"devDependencies": {
"@chromatic-com/storybook": "^3.2.2",
"@eslint/js": "^9.13.0",
"@storybook/addon-essentials": "^8.4.2",
"@storybook/addon-interactions": "^8.4.2",
"@storybook/addon-onboarding": "^8.4.2",
"@storybook/blocks": "^8.4.2",
"@storybook/react": "^8.4.2",
"@storybook/react-vite": "^8.4.2",
"@storybook/test": "^8.4.2",
"@types/navermaps": "^3.7.8",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react-router-dom": "^5.3.3",
"@vitejs/plugin-react-swc": "^3.5.0",
"autoprefixer": "^10.4.20",
"classnames": "^2.5.1",
"eslint": "^9.13.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"eslint-plugin-storybook": "^0.11.0",
"globals": "^15.11.0",
"postcss": "^8.4.47",
"storybook": "^8.4.2",
"tailwindcss": "^3.4.14",
"typescript": "~5.6.2",
"typescript-eslint": "^8.11.0",
"vite": "^5.4.10",
"vite-tsconfig-paths": "^5.1.1"
},
"eslintConfig": {
"extends": [
"plugin:storybook/recommended"
]
}
}
1 change: 0 additions & 1 deletion frontend/public/vite.svg

This file was deleted.

4 changes: 3 additions & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export const App = () => <div>Hello</div>;
import { IndexRoutes } from '@/routes/IndexRoutes.tsx';

export const App = () => <IndexRoutes />;
53 changes: 53 additions & 0 deletions frontend/src/component/BottomSheet/BottomSheet.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import React from 'react';
import { useBottomSheet } from '@/hooks/useBottomSheet';

interface IBottomSheetProps {
minHeight: number;
maxHeight: number;
children: React.ReactNode;
}

/**
* `BottomSheet` ์ปดํฌ๋„ŒํŠธ๋Š” ํ•˜๋‹จ์—์„œ ์˜ฌ๋ผ์˜ค๋Š” ์‹œํŠธ ํ˜•ํƒœ์˜ UI๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
*
* @param {IBottomSheetProps} props - `children`์„ ํฌํ•จํ•œ ์ปดํฌ๋„ŒํŠธ ์†์„ฑ
* @param {number} props.minHeight - Bottom Sheet์˜ ์ตœ์†Œ ๋†’์ด๋ฅผ ํ™”๋ฉด ๋น„์œจ๋กœ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค (0.0 - 1.0).
* @param {number} props.maxHeight - Bottom Sheet์˜ ์ตœ๋Œ€ ๋†’์ด๋ฅผ ํ™”๋ฉด ๋น„์œจ๋กœ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค (0.0 - 1.0).
* @param {ReactNode} props.children - Bottom Sheet ๋‚ด๋ถ€์— ๋ Œ๋”๋งํ•  ์ฝ˜ํ…์ธ ์ž…๋‹ˆ๋‹ค.
* @returns {ReactNode} - ํ•˜๋‹จ ์‹œํŠธ๋ฅผ ๋ Œ๋”๋งํ•ฉ๋‹ˆ๋‹ค.
*
* @remarks
* - ๋“œ๋ž˜๊ทธ ๋™์ž‘์„ ํ†ตํ•ด ์‹œํŠธ๋ฅผ ์—ด๊ณ  ๋‹ซ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
* - `useBottomSheet` ํ›…์„ ์‚ฌ์šฉํ•˜์—ฌ ์œ„์น˜ ๋ฐ ๋“œ๋ž˜๊ทธ ๋™์ž‘์„ ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค.
* - `minHeight`๋Š” Bottom Sheet๊ฐ€ ๋‹ซํžŒ ์ƒํƒœ์˜ ๋†’์ด ๋น„์œจ์„ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค.
* - `maxHeight`๋Š” Bottom Sheet๊ฐ€ ์—ด๋ฆฐ ์ƒํƒœ์˜ ์ตœ๋Œ€ ๋†’์ด ๋น„์œจ์„ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค.
*
* @example
* ```tsx
* <BottomSheet minHeight={0.5} maxHeight={0.85}>
* <div className="p-4">
* <h2>์˜ˆ์‹œ ์ฝ˜ํ…์ธ </h2>
* <p>BottomSheet์˜ children</p>
* </div>
* </BottomSheet>
* ```
*/

export const BottomSheet = (props: IBottomSheetProps) => {
const { sheet } = useBottomSheet({ minHeight: props.minHeight, maxHeight: props.maxHeight });

return (
<div
ref={sheet}
className="bg-grayscale-25 shadow-dark fixed left-0 right-0 z-[101] flex h-full flex-col rounded-t-lg transition-transform duration-700"
style={{
top: `calc(100% - ${props.minHeight * 100}%)`,
}}
>
<div className="flex items-center justify-center pb-1 pt-2">
<div className="h-1.5 w-12 rounded-full bg-gray-300" />
</div>
{props.children}
</div>
);
};
Loading

0 comments on commit 6c5c6a5

Please sign in to comment.