Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
public_content
react-task-management-app
Commits
6b6959bb
Commit
6b6959bb
authored
1 year ago
by
Aman Kumar
Browse files
Options
Download
Email Patches
Plain Diff
Logout functionality add commit
parent
5d15f704
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
10 deletions
+40
-10
src/components/Auth/Login/Login.css
src/components/Auth/Login/Login.css
+4
-0
src/components/Auth/Login/Login.jsx
src/components/Auth/Login/Login.jsx
+2
-0
src/components/Auth/Register/Register.css
src/components/Auth/Register/Register.css
+5
-0
src/components/Auth/Register/Register.jsx
src/components/Auth/Register/Register.jsx
+4
-0
src/components/TaskDashboard/TaskDashboard.jsx
src/components/TaskDashboard/TaskDashboard.jsx
+25
-10
No files found.
src/components/Auth/Login/Login.css
View file @
6b6959bb
...
...
@@ -9,4 +9,8 @@
/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
background
:
linear-gradient
(
to
right
,
rgba
(
106
,
17
,
203
,
1
),
rgba
(
37
,
117
,
252
,
1
))
}
.form-input
{
color
:
#fff
!important
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/components/Auth/Login/Login.jsx
View file @
6b6959bb
...
...
@@ -76,6 +76,7 @@ function Login() {
name
=
"email"
onChange
=
{
(
e
)
=>
handleInputUpdate
(
e
)
}
id
=
"formControlLg"
className
=
"form-input"
type
=
"email"
size
=
"lg"
/>
...
...
@@ -85,6 +86,7 @@ function Login() {
label
=
"Password"
name
=
"password"
id
=
"formControlLg"
className
=
"form-input"
type
=
"password"
onChange
=
{
(
e
)
=>
handleInputUpdate
(
e
)
}
size
=
"lg"
...
...
This diff is collapsed.
Click to expand it.
src/components/Auth/Register/Register.css
View file @
6b6959bb
...
...
@@ -10,3 +10,8 @@
/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
background
:
linear-gradient
(
to
right
,
rgba
(
106
,
17
,
203
,
1
),
rgba
(
37
,
117
,
252
,
1
))
}
.form-input
{
color
:
#fff
!important
}
This diff is collapsed.
Click to expand it.
src/components/Auth/Register/Register.jsx
View file @
6b6959bb
...
...
@@ -83,6 +83,7 @@ function Register() {
wrapperClass
=
"mb-4 mx-5 w-100"
color
=
"white"
labelClass
=
"text-white"
className
=
"form-input"
onChange
=
{
(
e
)
=>
handleInputUpdate
(
e
)
}
name
=
"username"
label
=
"User name"
...
...
@@ -93,6 +94,7 @@ function Register() {
<
MDBInput
wrapperClass
=
"mb-4 mx-5 w-100"
labelClass
=
"text-white"
className
=
"form-input"
onChange
=
{
(
e
)
=>
handleInputUpdate
(
e
)
}
name
=
"email"
label
=
"Email address"
...
...
@@ -103,6 +105,7 @@ function Register() {
<
MDBInput
wrapperClass
=
"mb-4 mx-5 w-100"
labelClass
=
"text-white"
className
=
"form-input"
onChange
=
{
(
e
)
=>
handleInputUpdate
(
e
)
}
name
=
"password"
label
=
"Password"
...
...
@@ -113,6 +116,7 @@ function Register() {
<
MDBInput
wrapperClass
=
"mb-4 mx-5 w-100"
labelClass
=
"text-white"
className
=
"form-input"
onChange
=
{
(
e
)
=>
handleInputUpdate
(
e
)
}
name
=
"confirmPassword"
label
=
"Confirm Password"
...
...
This diff is collapsed.
Click to expand it.
src/components/TaskDashboard/TaskDashboard.jsx
View file @
6b6959bb
...
...
@@ -158,16 +158,18 @@ export default function Register() {
</
h6
>
</
td
>
<
td
className
=
"align-middle"
>
<
MDBTooltip
tag
=
"a"
wrapperProps
=
{
{
href
:
"
#!
"
}
}
title
=
"Done"
>
<
MDBIcon
fas
icon
=
"check"
color
=
"success"
size
=
"lg"
className
=
"me-3"
onClick
=
{
()
=>
updateTaskStatus
(
task
.
_id
)
}
/>
</
MDBTooltip
>
{
!
task
.
isCompletedTask
&&
(
<
MDBTooltip
tag
=
"a"
wrapperProps
=
{
{
href
:
"
#!
"
}
}
title
=
"Done"
>
<
MDBIcon
fas
icon
=
"check"
color
=
"success"
size
=
"lg"
className
=
"me-3"
onClick
=
{
()
=>
updateTaskStatus
(
task
.
_id
)
}
/>
</
MDBTooltip
>
)
}
<
MDBTooltip
tag
=
"a"
wrapperProps
=
{
{
href
:
"
#!
"
}
}
title
=
"Remove"
>
<
MDBIcon
fas
...
...
@@ -191,6 +193,18 @@ export default function Register() {
<
MDBRow
className
=
"d-flex justify-content-center align-items-center"
>
<
MDBCol
md
=
"12"
xl
=
"10"
>
<
MDBCard
>
{
isLoggedIn
&&
(
<
MDBBtn
style
=
{
{
position
:
"
absolute
"
,
right
:
"
10px
"
,
top
:
"
10px
"
}
}
color
=
"danger"
onClick
=
{
()
=>
{
localStorage
.
removeItem
(
"
token
"
);
// Clear token from localStorage
window
.
location
.
reload
();
// Reload the page
}
}
>
Logout
</
MDBBtn
>
)
}
<
MDBCardBody
className
=
"p-4 text-black"
>
<
div
className
=
"text-center pt-3 pb-2"
>
<
img
...
...
@@ -199,6 +213,7 @@ export default function Register() {
width
=
"60"
/>
<
h2
className
=
"my-4"
>
Task List
</
h2
>
{
isLoggedIn
&&
(
<
MDBBtn
onClick
=
{
()
=>
setShowForm
(
!
showForm
)
}
>
Create Task
...
...
This diff is collapsed.
Click to expand it.
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