-
Notifications
You must be signed in to change notification settings - Fork 10
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주차] 이지인 미션 제출합니다. #6
Open
jinnyleeis
wants to merge
15
commits into
CEOS-Developers:master
Choose a base branch
from
jinnyleeis:master
base: master
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.
Open
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d015dad
<setting> npm install
jinnyleeis b8bb3ab
<feat> 섹션 추가, 아이템 추가 기능 구현
jinnyleeis 6a2d340
<feat> 아이템 삭제 기능 추가
jinnyleeis edd4ba8
<feat> 섹션 삭제 기능 구현
jinnyleeis 3adfcdb
<feat> 섹션 삭제 버튼 섹션명 옆으로 위치 변경
jinnyleeis f6bff54
<feat> 로컬 스토리지에 섹션/할일 저장/업데이트 기능
jinnyleeis 6e9b90e
<feat> 글로벌 스타일 폰트 속성 설정
jinnyleeis 8a08834
<feat> 남은 할일 개수, 오늘 날짜 띄우기 기능 구현
jinnyleeis 43869c3
<feat> 완료 -> 삭제버튼으로 변경, 완료 버튼 추가 & 화면에 완료된 할 일 표시 구현
jinnyleeis 3ac6e99
<style> 버튼 스타일 변경, 할 일 완료시 이모지 보여주는 기능 구현
jinnyleeis a774b7b
<feat> README.md에 배포 링크 추가
jinnyleeis 85519e4
<comment> 주석 업데이트, README.md 업데이트
jinnyleeis 185f054
Update README.md
jinnyleeis 7fff777
README.md 업데이트
jinnyleeis cf774e8
Update README.md
jinnyleeis 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
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,59 @@ | ||
import React, { useState } from 'react'; | ||
import styled from 'styled-components'; | ||
import TodoItem from './TodoItem'; | ||
|
||
const SectionContainer = styled.div` | ||
margin: 20px; | ||
padding: 10px; | ||
border: 1px solid #ccc; | ||
border-radius: 5px; | ||
`; | ||
|
||
const Input = styled.input` | ||
margin: 10px; | ||
padding: 10px; | ||
border-radius: 5px; | ||
border: 1px solid #ccc; | ||
`; | ||
|
||
const Button = styled.button` | ||
padding: 10px 20px; | ||
margin: 5px; | ||
border-radius: 5px; | ||
background-color: #007bff; | ||
color: white; | ||
border: none; | ||
cursor: pointer; | ||
|
||
&:hover { | ||
background-color: #0056b3; | ||
} | ||
`; | ||
|
||
function Section({ section }) { | ||
const [todos, setTodos] = useState(section.todos); | ||
const [todoText, setTodoText] = useState(''); | ||
|
||
const addTodo = () => { | ||
setTodos([...todos, { id: todos.length + 1, text: todoText }]); | ||
setTodoText(''); | ||
}; | ||
|
||
return ( | ||
<SectionContainer> | ||
<h2>{section.name}</h2> | ||
<Input | ||
type="text" | ||
placeholder="New Todo" | ||
value={todoText} | ||
onChange={(e) => setTodoText(e.target.value)} | ||
/> | ||
<Button onClick={addTodo}>Add Todo</Button> | ||
{todos.map((todo) => ( | ||
<TodoItem key={todo.id} todo={todo} /> | ||
))} | ||
</SectionContainer> | ||
); | ||
} | ||
|
||
export default Section; |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 리액트는 통용화되는 폴더 구조가 있더라구요...! 리액트 폴더구조 확인해 보시면 좋을거 같아요~ |
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,20 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
const ItemContainer = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
margin: 10px; | ||
padding: 10px; | ||
border-bottom: 1px solid #eee; | ||
`; | ||
|
||
function TodoItem({ todo }) { | ||
return ( | ||
<ItemContainer> | ||
<span>{todo.text}</span> | ||
</ItemContainer> | ||
); | ||
} | ||
|
||
export default TodoItem; |
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,10 +1,10 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom/client"; | ||
import App from "./App"; | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom/client'; | ||
import App from './App'; | ||
|
||
const root = ReactDOM.createRoot(document.getElementById("root")); | ||
const root = ReactDOM.createRoot(document.getElementById('root')); | ||
root.render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
); |
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.
px단위도 좋지만 반응형을 위해 rem단위를 사용했어도 좋았을 거 같아요!