-
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
Add login page #1
Conversation
926b4cd
to
1fb556d
Compare
1fb556d
to
9a40ddb
Compare
ea31528
to
b7f53ac
Compare
b7f53ac
to
68bdff9
Compare
1de368c
to
916f514
Compare
a512e88
to
4e35589
Compare
4e35589
to
e7a87a8
Compare
e7a87a8
to
bb13b83
Compare
bb13b83
to
4212ec4
Compare
4212ec4
to
608348f
Compare
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400;700;900;&display=swap" | ||
rel="stylesheet" | ||
> |
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.
add trailing slack if necessary
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.
Do you mean trailing slash? If yes, it's not required here.
|
||
const login = myWrapRoute({ | ||
title: 'Login', | ||
path: 'login', |
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.
path: 'login', | |
path: '/login', |
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.
Not required here, either.
text-align: center; | ||
|
||
.logo { | ||
width: 450px; |
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.
define in rem
input={siteKey && ( | ||
<HCaptcha | ||
ref={elementRef} | ||
// disabled={disabled || readOnly} |
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.
Double-check if disabled is required or not.
import { | ||
hCaptchaKey as hCaptchaKeyFromEnv, | ||
} from './env.ts'; | ||
|
||
// eslint-disable-next-line import/prefer-default-export | ||
export const hCaptchaKey = hCaptchaKeyFromEnv; |
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.
Lets remove this file and direcly use the key in hCaptcha file
src/views/Register/index.tsx
Outdated
|
||
import styles from './index.module.css'; | ||
|
||
// FIXME: import is weird will full names |
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.
Which import?
src/views/ResetPassword/index.tsx
Outdated
} | ||
if (response.ok) { | ||
alert.show( | ||
'Logged in successfully!', |
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.
'Logged in successfully!', | |
'Password reset successfully!', |
src/views/ResetPassword/index.tsx
Outdated
type="submit" | ||
disabled={pristine || resetPasswordPending} | ||
onClick={handleSubmit} | ||
// FIXME: disable button when submitting |
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 think this is already done
name="captcha" | ||
elementRef={elementRef} | ||
siteKey={hCaptchaKey} | ||
// value={value.captcha} |
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.
This should be present
alert.show( | ||
'Logged in successfully!', | ||
{ variant: 'success' }, | ||
); |
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.
We need to redirect the user to login page after password is reset.
697b1c5
to
848c9cb
Compare
}, | ||
}); | ||
|
||
// FIXME: eager load this page |
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.
remove fixme
useParams, | ||
} from 'react-router-dom'; | ||
|
||
// import { wrappedRoutes } from '../App/routes.tsx'; |
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.
remove if not used
src/utils/localStorage.ts
Outdated
@@ -0,0 +1,12 @@ | |||
export function getFromStorage<T>(key: string) { |
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 don't this is required any longer.
454f1b8
to
839d54d
Compare
839d54d
to
b58c8e6
Compare
b58c8e6
to
f418d78
Compare
No description provided.