Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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?

.DS_Store
node_modules/
.env

101 changes: 61 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,73 @@
# 🌐 Web A
# React + TypeScript + Vite

DKU UMC Web 스터디 A조
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

## 👥 Member
Currently, two official plugins are available:

| 임세윤 | 지현구 | 최지우 | 김정현 |
| :------: | :------: | :------: | :------: |
| [임세윤](https://github.com/seyun31) | [지현구](https://github.com/stringnine) | [최지우](https://github.com/Choijiw00) |
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

<br/>
## React Compiler

## ⭐️ 스터디 규칙
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).

✅ 워크북 노션 채우기 <br />
✅ 워크북 완료 후 해당 주차 PR 올리기
## Expanding the ESLint configuration

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

## 🌳 branch 규칙
```js
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...

```bash
├─main
├─judy/main
│ └─judy/#1
// 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,

// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
```

1. `닉네임/main 브랜치`가 기본 브랜치로 pr 보낼 때 root 브랜치(main 브랜치)가 아닌 닉네임/main 브랜치로 올립니다.
2. 매주 워크북, 실습, 그리고 미션은 각자의 닉네임/main 브랜치를 base 브랜치로 삼아 `닉네임/이슈번호 브랜치`를 생성하여 관련 파일을 업로드합니다.
3. 모든 스터디원의 approve를 받으면, pr을 머지하고 해당 pr을 생성한 브랜치(닉네임/이슈번호 브랜치)는 삭제합니다. approve와 merge는 스터디 진행 중에 이루어집니다.

<br/>

## 🔖 커밋 컨벤션

| Message | 설명 |
| :------: | :------------------ |
| mission | 미션 수행 |
| practice | 실습 수행 |
| workbook | 워크북 정리 |
| refactor | 코드 리팩토링 |
| feat | 기능 추가 |
| fix | 버그 수정 |
| docs | 문서 수정 |
| comment | 주석 추가 및 변경 |
| remove | 파일 혹은 폴더 삭제 |
| chore | 기타 변경사항 |

```bash
// 커밋 메시지
[week1/mission] 미션 제목
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 defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
```
22 changes: 22 additions & 0 deletions TEMP_MyPage_UPDATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# MyPage.tsx 업데이트 필요

구글 로그인 후 바로 `/my`로 리다이렉트되기 때문에, `MyPage` 컴포넌트에서도 `localStorage`의 `redirectAfterLogin`을 확인해야 합니다.

## 수정 필요 사항:

`MyPage.tsx`의 `useEffect`에 다음 로직 추가:
1. 컴포넌트 마운트 시 `localStorage.getItem('redirectAfterLogin')` 확인
2. 값이 있으면 해당 경로로 `navigate`
3. `localStorage.removeItem('redirectAfterLogin')` 실행

## 예시 코드:

```tsx
useEffect(() => {
const redirectPath = localStorage.getItem('redirectAfterLogin');
if (redirectPath && redirectPath !== 'null' && redirectPath !== 'undefined') {
localStorage.removeItem('redirectAfterLogin');
navigate(redirectPath, { replace: true });
}
}, [navigate]);
```
23 changes: 23 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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'
import { defineConfig, globalIgnores } from 'eslint/config'

export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs['recommended-latest'],
reactRefresh.configs.vite,
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
},
])
13 changes: 13 additions & 0 deletions 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>umc-9th-mission</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading