Skip to content

feat: React 투입/반환 기능 테스트 및 구현 #136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
7b07c3e
feat: 투입 기능 구현 시작
sanholl Mar 24, 2025
9ce7eea
feat: 투입 기능 부분 구현
sanholl Mar 24, 2025
c1bec12
feat: 잔액 조회, 추가, 초기화를 위한 BalanceManager 객체 추가 및 적용
sanholl Mar 24, 2025
a71035d
refactor: 제네릭 타입 변경
sanholl Mar 24, 2025
7c06c4d
fix: 투입시 오류 수정
sanholl Mar 24, 2025
dc44a11
feat: 금액 입력창 콤마 표시
sanholl Mar 25, 2025
84a2dd4
chore: refund button class명 수정
sanholl Mar 25, 2025
8f4c288
Delete packages/bora-vanilla/package-lock.json
sanholl Mar 25, 2025
53d8522
Delete packages/doowon-vanilla/package-lock.json
sanholl Mar 25, 2025
b9d0703
Delete packages/seongkyeong-vanilla/package-lock.json
sanholl Mar 25, 2025
fabc8b7
Delete packages/taegon-vanilla/package-lock.json
sanholl Mar 25, 2025
b25f9b3
fix: 변수명 오타 수정
sanholl Mar 26, 2025
762dbd6
refactor: 'ko-KR' 로케일 명시하여 숫자 포맷 일관성 확보
sanholl Mar 26, 2025
4dd1ded
refactor: 금액 표기 toLocaleString 로직 함수로 분리
sanholl Mar 26, 2025
4a0ce88
chore: alert() 대신 role="alert"을 사용한 접근성 대응 에러 메시지 적용 및 피드백 수용
sanholl Mar 27, 2025
fb95484
feat: 반환 기능 구현
sanholl Mar 27, 2025
a57d066
Merge branch 'main' into hansol-vanilla/feat-refund
sanholl Mar 27, 2025
2a1cc3f
refactor: store분리, 필수 DOM 요소 유효성 검사용 유틸 함수 생성 및 적용
sanholl Mar 28, 2025
9936361
fix: 반환시 오류 수정
sanholl Mar 29, 2025
a2c473f
feat: 구매 기능 구현
sanholl Mar 29, 2025
bdd09c3
feat: 상품 버튼 동적 생성
sanholl Mar 29, 2025
5664cb7
feat: 구매 기능 구현
sanholl Mar 29, 2025
c4cdc4e
feat: 돌발 미션 추가
sanholl Mar 29, 2025
cb02cf2
chore: purchase import
sanholl Mar 29, 2025
2c423d2
Merge branch 'main' into hansol-vanilla/feat-purchase
sanholl Mar 29, 2025
b3a53b3
feat: 로그창 스크롤 하단 고정
sanholl Mar 29, 2025
a3c82ee
fix: 상품 버튼 클릭시 오류 수정
sanholl Mar 30, 2025
f5c865c
refactor: css 수정 & 반응형 추가
sanholl Apr 2, 2025
d604d54
feat: init react project
sanholl Apr 2, 2025
557fdb9
feat: test 초기 셋팅
sanholl Apr 2, 2025
75f990c
Merge branch 'main' into hansol-react/feat-layout
sanholl Apr 2, 2025
cdea94d
feat: styled-component 설치 및 기본 레이아웃 구성
sanholl Apr 2, 2025
fe3d411
feat: 기본 layout 및 디렉토리 구조 세팅
sanholl Apr 3, 2025
74d4974
feat: 상품 버튼 동적 구현
sanholl Apr 3, 2025
e719133
feat: 자판기 영역 UI 테스트 코드 추가
sanholl Apr 4, 2025
98c209d
feat: 컨트롤 패널 UI 테스트 코드 추가
sanholl Apr 4, 2025
8360d31
fix: 테스트 코드 수정
sanholl Apr 4, 2025
be6c94c
fix: 테스트 설명 수정
sanholl Apr 4, 2025
afb3a93
feat: 투입/반환 기능 브랜치 생성
sanholl Apr 4, 2025
abda95e
feat: common 함수 테스트코드 작성
sanholl Apr 4, 2025
d6e4683
feat: balanceReducer, logMessageReducer 테스트 코드 작성 및 구현
sanholl Apr 4, 2025
4b5c6a0
feat: 투입/반환 및 로그출력 테스트코드 작성 및 구현
sanholl Apr 4, 2025
c31aaaf
feat: appendParticle 테스트 코드 추가
sanholl Apr 5, 2025
b7dbc5d
feat: reducer 테스트 코드 수정
sanholl Apr 5, 2025
92d3d9a
chore: common 테스트 코드 수정
sanholl Apr 5, 2025
346b97a
feat: 가격 입력, 투입, 반환 테스트 코드 수정
sanholl Apr 5, 2025
c2b1058
feat: 투입, 반환 테스트코드 수정
sanholl Apr 5, 2025
9a17357
faet: 로그창 스크롤 하단 고정
sanholl Apr 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions packages/hansol-react/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
54 changes: 54 additions & 0 deletions packages/hansol-react/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

```js
export default tseslint.config({
extends: [
// Remove ...tseslint.configs.recommended and replace with this
...tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
...tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
...tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
```

You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:

```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default tseslint.config({
plugins: {
// Add the react-x and react-dom plugins
'react-x': reactX,
'react-dom': reactDom,
},
rules: {
// other rules...
// Enable its recommended typescript rules
...reactX.configs['recommended-typescript'].rules,
...reactDom.configs.recommended.rules,
},
})
```
28 changes: 28 additions & 0 deletions packages/hansol-react/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
)
13 changes: 13 additions & 0 deletions packages/hansol-react/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading