Skip to content
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

Merged
merged 13 commits into from
Aug 1, 2023
Merged

Add login page #1

merged 13 commits into from
Aug 1, 2023

Conversation

subinasr
Copy link
Collaborator

No description provided.

@subinasr subinasr marked this pull request as ready for review June 16, 2023 08:02
@subinasr subinasr force-pushed the feature/login-page branch 2 times, most recently from 926b4cd to 1fb556d Compare June 16, 2023 08:06
@subinasr subinasr force-pushed the feature/login-page branch 4 times, most recently from a512e88 to 4e35589 Compare July 11, 2023 11:02
@subinasr subinasr temporarily deployed to Test July 11, 2023 11:05 — with GitHub Actions Inactive
@subinasr subinasr temporarily deployed to Test July 11, 2023 11:07 — with GitHub Actions Inactive
@subinasr subinasr temporarily deployed to Test July 11, 2023 11:09 — with GitHub Actions Inactive
@subinasr subinasr temporarily deployed to Test July 11, 2023 11:10 — with GitHub Actions Inactive
@subinasr subinasr temporarily deployed to Test July 11, 2023 11:15 — with GitHub Actions Inactive
- Add submodule
@subinasr subinasr temporarily deployed to Test July 12, 2023 04:06 — with GitHub Actions Inactive
@subinasr subinasr temporarily deployed to Test July 12, 2023 04:21 — with GitHub Actions Inactive
@subinasr subinasr temporarily deployed to Test July 12, 2023 04:39 — with GitHub Actions Inactive
@subinasr subinasr temporarily deployed to Test July 12, 2023 04:39 — with GitHub Actions Inactive
Comment on lines +24 to +29
<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"
>
Copy link
Member

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

Copy link
Collaborator Author

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',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path: 'login',
path: '/login',

Copy link
Collaborator Author

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;
Copy link
Member

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}
Copy link
Member

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.

Comment on lines +1 to +6
import {
hCaptchaKey as hCaptchaKeyFromEnv,
} from './env.ts';

// eslint-disable-next-line import/prefer-default-export
export const hCaptchaKey = hCaptchaKeyFromEnv;
Copy link
Member

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


import styles from './index.module.css';

// FIXME: import is weird will full names
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which import?

}
if (response.ok) {
alert.show(
'Logged in successfully!',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'Logged in successfully!',
'Password reset successfully!',

type="submit"
disabled={pristine || resetPasswordPending}
onClick={handleSubmit}
// FIXME: disable button when submitting
Copy link
Member

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}
Copy link
Member

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' },
);
Copy link
Member

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.

@subinasr subinasr temporarily deployed to Test July 19, 2023 13:01 — with GitHub Actions Inactive
},
});

// FIXME: eager load this page
Copy link
Member

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';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove if not used

@@ -0,0 +1,12 @@
export function getFromStorage<T>(key: string) {
Copy link
Member

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.

@subinasr subinasr temporarily deployed to Test July 20, 2023 09:22 — with GitHub Actions Inactive
@subinasr subinasr temporarily deployed to Test July 20, 2023 09:38 — with GitHub Actions Inactive
@subinasr subinasr temporarily deployed to Test July 20, 2023 09:42 — with GitHub Actions Inactive
@AdityaKhatri AdityaKhatri merged commit 46a20e8 into develop Aug 1, 2023
6 of 7 checks passed
@AdityaKhatri AdityaKhatri deleted the feature/login-page branch August 1, 2023 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants