Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
form-creator-ui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
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
simmctic
form-creator
form-creator-ui
Commits
926fdc63
Commit
926fdc63
authored
4 years ago
by
Stephanie Briere Americo
Browse files
Options
Downloads
Plain Diff
Merge branch 'issue/46-URL' into 'development'
Issue
#46
:FIX ? in URL solved See merge request
!44
parents
a0063345
cfe38df0
No related branches found
No related tags found
3 merge requests
!58
Version 1.1
,
!54
Issue #53: Fix password info
,
!44
Issue #46:FIX ? in URL solved
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pages/SignIn.js
+22
-23
22 additions, 23 deletions
src/pages/SignIn.js
with
22 additions
and
23 deletions
src/pages/SignIn.js
+
22
−
23
View file @
926fdc63
...
...
@@ -10,7 +10,7 @@ import FormInput from "../components/fieldsSignUp/FormInput";
import
Paper
from
"
@material-ui/core/Paper
"
;
import
api
from
"
../api
"
;
const
useStyles
=
makeStyles
(
(
theme
)
=>
({
const
useStyles
=
makeStyles
(
theme
=>
({
register
:
{
maxWidth
:
"
1000px
"
,
background
:
"
#ffffff
"
,
...
...
@@ -18,25 +18,25 @@ const useStyles = makeStyles((theme) => ({
padding
:
"
2% 1%
"
,
margin
:
"
0 auto
"
,
marginTop
:
"
9%
"
,
width
:
"
95%
"
,
width
:
"
95%
"
},
custom_strong
:
{
fontSize
:
"
25px
"
,
textAlign
:
"
center
"
,
display
:
"
block
"
,
color
:
"
#46525d
"
,
color
:
"
#46525d
"
},
strong_description
:
{
fontSize
:
"
14px
"
,
color
:
"
#c2c6ca
"
,
color
:
"
#c2c6ca
"
},
form
:
{
marginTop
:
"
3%
"
,
alignItems
:
"
center
"
,
textAlign
:
"
center
"
,
textAlign
:
"
center
"
},
noAcc
:
{
marginTop
:
"
10px
"
,
marginTop
:
"
10px
"
},
button
:
{
type
:
"
submit
"
,
...
...
@@ -47,12 +47,12 @@ const useStyles = makeStyles((theme) => ({
padding
:
"
10px 20px
"
,
fontSize
:
"
18px
"
,
"
&:hover
"
:
{
backgroundColor
:
"
rgb(25, 109, 23)
"
,
backgroundColor
:
"
rgb(25, 109, 23)
"
},
[
"
@media (max-width:550px)
"
]:
{
width
:
"
55%
"
,
}
,
}
,
width
:
"
55%
"
}
}
}));
export
default
function
SignIn
()
{
const
classes
=
useStyles
();
...
...
@@ -63,13 +63,13 @@ export default function SignIn() {
const
[
values
,
setValues
]
=
React
.
useState
({
email
:
""
,
password
:
""
,
emailError
:
false
,
emailError
:
false
});
async
function
update
(
prop
,
event
)
{
await
setValues
({
...
values
,
[
prop
]:
event
.
target
.
value
});
}
const
handleChange
=
(
prop
)
=>
(
event
)
=>
{
const
handleChange
=
prop
=>
event
=>
{
if
(
!
checkEmail
())
{
values
.
emailError
=
true
;
}
else
{
...
...
@@ -103,9 +103,9 @@ export default function SignIn() {
const
response
=
await
api
.
post
(
`/user/signIn`
,
{
email
:
values
.
email
,
hash
:
values
.
password
,
hash
:
values
.
password
})
.
then
(
function
(
response
)
{
.
then
(
function
(
response
)
{
if
(
!
response
.
data
.
error
)
{
window
.
sessionStorage
.
setItem
(
"
token
"
,
response
.
data
.
token
);
window
.
sessionStorage
.
setItem
(
"
userId
"
,
response
.
data
.
id
);
...
...
@@ -113,7 +113,7 @@ export default function SignIn() {
history
.
push
(
path
);
}
})
.
catch
(
function
(
error
)
{
.
catch
(
function
(
error
)
{
if
(
error
.
response
)
{
alert
(
"
Falha de autenticação. Certifique-se que email e senha estão corretos.
"
...
...
@@ -131,19 +131,19 @@ export default function SignIn() {
const
theme
=
createMuiTheme
({
overrides
:
{
root
:
{
color
:
"
white
"
,
color
:
"
white
"
},
MuiInput
:
{
underline
:
{
"
&:before
"
:
{
borderBottom
:
"
1px solid #35c7fc
"
,
borderBottom
:
"
1px solid #35c7fc
"
},
"
&:after
"
:
{
borderBottom
:
"
1px solid #3f51b5
"
,
}
,
}
,
}
,
}
,
borderBottom
:
"
1px solid #3f51b5
"
}
}
}
}
});
return
isLoged
?
(
<
Redirect
to
=
{
`/list/
${
window
.
sessionStorage
.
getItem
(
"
userId
"
)}
`
}
/
>
...
...
@@ -175,7 +175,6 @@ export default function SignIn() {
<
/Grid
>
<
Grid
>
<
IconButton
type
=
"
submit
"
size
=
"
medium
"
className
=
{
classes
.
button
}
id
=
"
whiteTextedButton
"
...
...
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