-
Notifications
You must be signed in to change notification settings - Fork 0
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
OV-1: Sign In flow #15
Conversation
}; | ||
|
||
const PasswordInput: React.FC<Properties> = ({ hasError }) => { | ||
const [showPassword, setShowPassword] = useState<boolean>(false); |
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.
errorMessage || | ||
UserValidationMessage.INVALID_DATA |
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.
errorMessage || | |
UserValidationMessage.INVALID_DATA | |
errorMessage ?? | |
UserValidationMessage.INVALID_DATA |
user: undefined, | ||
errorMessage: undefined, |
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.
replace undefined with null
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.
I use undefined
for errorMessage because on rejected case I assign state.errorMessage = action.error.message
which has string | undefined
type. And for user I use undefined for consistency.
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.
Error messages from the backend we will display as Toast notification so there is no need to have this field in store
You will get the error messages that we need from zod
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.
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.
Skip it for now, we'll also handle it in our middleware
Please replace rem with px we will use px throughout the code |
64714e3
to
92546b1
Compare
92546b1
to
f554d56
Compare
fc3f5f3
This PR adds Sign In flow: