Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
react-todo-app
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ajmal.S
react-todo-app
Commits
2802ecb8
Commit
2802ecb8
authored
Feb 17, 2022
by
Ajmal.S
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes
parent
58a4b846
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
App.js
src/App.js
+2
-2
CompletedTodos.js
src/components/CompletedTodos.js
+2
-2
TodoHome.js
src/components/TodoHome.js
+4
-4
TodoItem.js
src/components/TodoItem.js
+2
-2
No files found.
src/App.js
View file @
2802ecb8
import
React
from
"react"
;
import
React
from
"react"
;
import
"./App.css"
;
import
"./App.css"
;
import
Todo
List
from
"./components/TodoList
"
;
import
Todo
Home
from
"./components/TodoHome
"
;
function
App
()
{
function
App
()
{
return
(
return
(
<
div
className
=
'task-main'
>
<
div
className
=
'task-main'
>
<
Todo
List
/>
<
Todo
Home
/>
<
/div
>
<
/div
>
);
);
}
}
...
...
src/components/CompletedTodos.js
View file @
2802ecb8
import
React
from
"react"
;
import
React
from
"react"
;
import
{
CgCloseO
}
from
"react-icons/cg"
;
import
{
CgCloseO
}
from
"react-icons/cg"
;
const
Todo
=
({
const
CompletedTodos
=
({
todos
,
todos
,
completeTodo
,
completeTodo
,
removeTodo
,
removeTodo
,
...
@@ -30,4 +30,4 @@ const Todo = ({
...
@@ -30,4 +30,4 @@ const Todo = ({
));
));
};
};
export
default
Todo
;
export
default
CompletedTodos
;
src/components/Todo
List
.js
→
src/components/Todo
Home
.js
View file @
2802ecb8
import
React
,
{
useState
}
from
"react"
;
import
React
,
{
useState
}
from
"react"
;
import
TodoForm
from
"./TodoForm"
;
import
TodoForm
from
"./TodoForm"
;
import
Todo
from
"./Todo
"
;
import
Todo
Item
from
"./TodoItem
"
;
import
Header
from
"./Header"
;
import
Header
from
"./Header"
;
import
CompletedTodos
from
"./CompletedTodos"
import
CompletedTodos
from
"./CompletedTodos"
function
Todo
List
()
{
function
Todo
Home
()
{
const
[
todos
,
setTodos
]
=
useState
([]);
const
[
todos
,
setTodos
]
=
useState
([]);
const
[
editId
,
setEdit
]
=
useState
(
false
);
const
[
editId
,
setEdit
]
=
useState
(
false
);
...
@@ -54,7 +54,7 @@ function TodoList() {
...
@@ -54,7 +54,7 @@ function TodoList() {
<>
<>
<
Header
todos
=
{
todos
}
/
>
<
Header
todos
=
{
todos
}
/
>
<
Todo
<
Todo
Item
todos
=
{
todos
}
todos
=
{
todos
}
completeTodo
=
{
completeTodo
}
completeTodo
=
{
completeTodo
}
removeTodo
=
{
removeTodo
}
removeTodo
=
{
removeTodo
}
...
@@ -75,4 +75,4 @@ function TodoList() {
...
@@ -75,4 +75,4 @@ function TodoList() {
);
);
}
}
export
default
Todo
List
;
export
default
Todo
Home
;
src/components/Todo.js
→
src/components/Todo
Item
.js
View file @
2802ecb8
import
React
from
"react"
;
import
React
from
"react"
;
import
{
CgCloseO
}
from
"react-icons/cg"
;
import
{
CgCloseO
}
from
"react-icons/cg"
;
const
CompletedTodos
=
({
const
TodoItem
=
({
todos
,
todos
,
completeTodo
,
completeTodo
,
removeTodo
,
removeTodo
,
...
@@ -51,4 +51,4 @@ const CompletedTodos = ({
...
@@ -51,4 +51,4 @@ const CompletedTodos = ({
));
));
};
};
export
default
CompletedTodos
;
export
default
TodoItem
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment