Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Digital course file
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SE-PROJECT-TEAM
Digital course file
Commits
371b1553
Commit
371b1553
authored
4 years ago
by
Ganapathi Subramanyam Jayam
Browse files
Options
Downloads
Patches
Plain Diff
confirm password
parent
e3c3b67d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
digital-course-file/package-lock.json
+41
-0
41 additions, 0 deletions
digital-course-file/package-lock.json
digital-course-file/package.json
+1
-0
1 addition, 0 deletions
digital-course-file/package.json
digital-course-file/src/user/Login.js
+25
-3
25 additions, 3 deletions
digital-course-file/src/user/Login.js
with
67 additions
and
3 deletions
digital-course-file/package-lock.json
+
41
−
0
View file @
371b1553
...
...
@@ -35,6 +35,7 @@
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.2",
"react-tooltip": "^4.2.17",
"sweetalert": "^2.1.2",
"web-vitals": "^1.1.0"
}
},
...
...
@@ -6920,6 +6921,11 @@
"event-emitter": "~0.3.5"
}
},
"node_modules/es6-object-assign": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz",
"integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw="
},
"node_modules/es6-set": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz",
...
...
@@ -18327,6 +18333,20 @@
"node": ">=4.0.0"
}
},
"node_modules/sweetalert": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/sweetalert/-/sweetalert-2.1.2.tgz",
"integrity": "sha512-iWx7X4anRBNDa/a+AdTmvAzQtkN1+s4j/JJRWlHpYE8Qimkohs8/XnFcWeYHH2lMA8LRCa5tj2d244If3S/hzA==",
"dependencies": {
"es6-object-assign": "^1.1.0",
"promise-polyfill": "^6.0.2"
}
},
"node_modules/sweetalert/node_modules/promise-polyfill": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-6.1.0.tgz",
"integrity": "sha1-36lpQ+qcEh/KTem1hoyznTRy4Fc="
},
"node_modules/symbol-tree": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
...
...
@@ -27196,6 +27216,11 @@
"event-emitter": "~0.3.5"
}
},
"es6-object-assign": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz",
"integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw="
},
"es6-set": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz",
...
...
@@ -36575,6 +36600,22 @@
"util.promisify": "~1.0.0"
}
},
"sweetalert": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/sweetalert/-/sweetalert-2.1.2.tgz",
"integrity": "sha512-iWx7X4anRBNDa/a+AdTmvAzQtkN1+s4j/JJRWlHpYE8Qimkohs8/XnFcWeYHH2lMA8LRCa5tj2d244If3S/hzA==",
"requires": {
"es6-object-assign": "^1.1.0",
"promise-polyfill": "^6.0.2"
},
"dependencies": {
"promise-polyfill": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-6.1.0.tgz",
"integrity": "sha1-36lpQ+qcEh/KTem1hoyznTRy4Fc="
}
}
},
"symbol-tree": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
This diff is collapsed.
Click to expand it.
digital-course-file/package.json
+
1
−
0
View file @
371b1553
...
...
@@ -31,6 +31,7 @@
"react-router-dom"
:
"^5.2.0"
,
"react-scripts"
:
"4.0.2"
,
"react-tooltip"
:
"^4.2.17"
,
"sweetalert"
:
"^2.1.2"
,
"web-vitals"
:
"^1.1.0"
},
"scripts"
:
{
...
...
This diff is collapsed.
Click to expand it.
digital-course-file/src/user/Login.js
+
25
−
3
View file @
371b1553
import
React
from
'
react
'
import
React
,
{
useState
}
from
'
react
'
import
GoogleButton
from
'
react-google-button
'
import
GithubButton
from
'
react-github-login-button
'
import
{
Link
}
from
'
react-router-dom
'
import
ParticlesBg
from
'
particles-bg
'
import
swal
from
'
sweetalert
'
const
Login
=
(
props
)
=>
{
const
{
...
...
@@ -19,11 +20,20 @@ const Login = (props) => {
googlesignin
,
githubsignin
,
}
=
props
const
[
confirmPassword
,
setConfirmPassword
]
=
useState
(
''
)
const
checkPassword
=
()
=>
{
if
(
confirmPassword
===
password
)
{
handleSignup
()
}
else
{
swal
(
'
Oops!
'
,
'
Passwords did not match!
'
,
'
error
'
)
}
}
return
(
<
section
>
<
div
className
=
'
loginContainer
'
>
<
label
>
UserName
<
/label
>
<
label
>
Email
<
/label
>
<
input
name
=
'
email
'
type
=
'
text
'
...
...
@@ -41,6 +51,18 @@ const Login = (props) => {
value
=
{
password
}
onChange
=
{(
e
)
=>
setPassword
(
e
.
target
.
value
)}
/
>
{
!
hasAccount
&&
(
<>
<
label
>
Confirm
Password
<
/label
>
<
input
name
=
'
password
'
type
=
'
password
'
required
value
=
{
confirmPassword
}
onChange
=
{(
e
)
=>
setConfirmPassword
(
e
.
target
.
value
)}
/
>
<
/
>
)}
<
p
className
=
'
errorMsg
'
>
{
passwordError
}
<
/p
>
<
div
className
=
'
btnContainer
'
>
{
hasAccount
?
(
...
...
@@ -63,7 +85,7 @@ const Login = (props) => {
</>
) : (
<>
<button name=
'
signup
'
onClick={
handleSignup
}>
<button name=
'
signup
'
onClick={
checkPassword
}>
Sign up
</button>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment