-
Notifications
You must be signed in to change notification settings - Fork 8
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
[2주차] 이효린 미션 제출합니다. #7
Open
hyorish03
wants to merge
24
commits into
URECA-ReCoder:main
Choose a base branch
from
hyorish03:hyorin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,727
−18
Open
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
f77ec81
Feat: Initial Setting
hyorish03 283fb0d
Feat: Vite 기본 마진 제거
hyorish03 2084c35
Revert "Feat: Vite 기본 마진 제거"
hyorish03 88b2c19
Feat: Vite 기본 마진 제거 및 StrictMode 제거
hyorish03 b8dda23
Feat: Header UI 구현
hyorish03 84775e7
Feat: TodoList UI 구현
hyorish03 b078703
Feat: DoneList UI 구현
hyorish03 c93b636
Feat: Header, TodoList, DoneList 컴포넌트 App.jsx에 import
hyorish03 c50916b
Feat: LocalStorage에 대한 get, set 함수 구현
hyorish03 af732c8
Fix: setLocalStorage 함수 내의 id 지정 방식 수정
hyorish03 fea26ee
Feat: addTodo 기능 구현
hyorish03 85abe44
Feat:TodoList 렌더링 기능 구현
hyorish03 031827f
Fix: localStorage에서 데이터를 불러와 todoList 상태 초기화
hyorish03 a7a470c
Refactor: useState 초기값으로 localStorage 데이터 사용하여 todoList 상태 초기화
hyorish03 f85502f
Refactor: 함수명 변경 setLocalStorage -> addToLocalStorage
hyorish03 f65969a
Fix: onKeyDown 한글 입력 시 두 번 실행되는 오류 수정
hyorish03 d957d87
Feat: todoList 완료여부 상태 변경 기능 구현
hyorish03 0de0688
Feat: Todo 삭제 기능 구현
hyorish03 eaf3c16
Feat: App에서 미완료/완료 리스트 구분 후 list 컴포넌트의 props로 전달하도록 수정
hyorish03 779bed8
Feat: 스타일링 수정 및 삭제버튼, todoItem 모듈화
hyorish03 5fd92bc
Refactor: Todo 항목 렌더링 모듈화
hyorish03 29b4b6e
Fix: 배경 색 스타일링 수정
hyorish03 b835b2d
Fix: 웹 사이트 아이콘 변경
hyorish03 32fe0fd
Feat: 배포확인용 커밋
hyorish03 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Feat: Todo 삭제 기능 구현
commit 0de068874540709fc6299bc6b49dbb84185aa3a7
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
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,8 @@ | ||
import { getLocalStorage } from './getLocalStorage'; | ||
|
||
export const deleteFromLocalStorage = (id) => { | ||
const prevTodo = getLocalStorage(); | ||
const newTodo = prevTodo.filter((todo) => todo.id !== id); | ||
localStorage.setItem('todo', JSON.stringify(newTodo)); | ||
alert('삭제되었습니다.'); | ||
}; | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
함수 이름인 addToLocalStorage, deleteFromLocalStorage, getLocalStorage, updateFromLocalStorage가 각 함수의 역할을 명확하게 설명하고 있어서 코드를 이해하기 정말 쉬웠습니다! 함수 이름을 짓는 기준이 혹시 있으신가요? 저도 다음번에는 더 직관적이게 개선하고싶어요!