-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from boostcampwm-2024/frontend
[FE][Feat] : ๋ฐฐํฌ๋ฅผ ์ํ ๋จธ์ง
- Loading branch information
Showing
55 changed files
with
2,060 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 />; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
); | ||
}; |
Oops, something went wrong.