-
Notifications
You must be signed in to change notification settings - Fork 38
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
Update node version and NPM packages #78
base: master
Are you sure you want to change the base?
Changes from all commits
fe32e7d
bf2ad8a
8c3eec9
9e38abd
4156baa
11f7210
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
14.15.0 | ||
16.17.0 |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import '../src/styles/sass/styles.scss'; | ||
import '../src/styles/vendor/bootstrap.min.css'; | ||
|
||
export default function App({ Component, pageProps }) { | ||
return <Component {...pageProps} />; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
import Layout from '../src/components/layouts/Layout'; | ||
// External. | ||
import { useMutation } from '@apollo/client'; | ||
import Link from 'next/link'; | ||
import Router from 'next/router'; | ||
import { useState } from 'react'; | ||
|
||
// Internal. | ||
import client from '../src/apollo/ApolloClient'; | ||
import { useMutation } from '@apollo/client' | ||
import MessageAlert from '../src/components/message-alert/MessageAlert'; | ||
import Layout from '../src/components/layouts/Layout'; | ||
import Loading from '../src/components/message-alert/Loading'; | ||
import Router from 'next/router'; | ||
import MessageAlert from '../src/components/message-alert/MessageAlert'; | ||
import { LOGIN_USER } from '../src/queries'; | ||
import { isUserValidated } from '../src/utils/auth-functions'; | ||
import isEmpty from '../src/validator/isEmpty'; | ||
import Link from 'next/link'; | ||
import validateAndSanitizeLoginForm from '../src/validator/login'; | ||
import { LOGIN_USER } from '../src/queries'; | ||
/** | ||
* Login functional component. | ||
* | ||
|
@@ -145,14 +148,9 @@ const Login = () => { | |
} | ||
}; | ||
|
||
const [ | ||
login, | ||
{ | ||
data: data, | ||
loading: loading, | ||
error: error, | ||
}, | ||
] = useMutation(LOGIN_USER, { client }) | ||
const [login, { loading: loading }] = useMutation(LOGIN_USER, { | ||
client | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Souptik2001 Let's break it into multiple lines to make it more readable There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @imranhsayed As per the current prettier configuration, as this line doesn't exceed a threshold line length limit, that's why it is showing error if we are breaking this line. So, should we change that configuration, because otherwise there will be linting error. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes please. let's update the configuration to make it look more readable @Souptik2001 |
||
|
||
return ( | ||
<Layout> | ||
|
@@ -163,12 +161,12 @@ const Login = () => { | |
{/* Error Message */} | ||
{'' !== errorMessage | ||
? showAlertBar && ( | ||
<MessageAlert | ||
message={errorMessage} | ||
success={false} | ||
onCloseButtonClick={onCloseButtonClick} | ||
/> | ||
) | ||
<MessageAlert | ||
message={errorMessage} | ||
success={false} | ||
onCloseButtonClick={onCloseButtonClick} | ||
/> | ||
) | ||
: ''} | ||
|
||
{/* Login Form */} | ||
|
@@ -177,7 +175,7 @@ const Login = () => { | |
<div className="form-group"> | ||
<label className="lead mt-1" htmlFor="username-or-email"> | ||
Username or email | ||
</label> | ||
</label> | ||
<input | ||
type="text" | ||
className="form-control" | ||
|
@@ -192,7 +190,7 @@ const Login = () => { | |
<div className="form-group"> | ||
<label className="lead mt-1" htmlFor="password"> | ||
Password | ||
</label> | ||
</label> | ||
<input | ||
type="password" | ||
className="form-control" | ||
|
@@ -210,9 +208,9 @@ const Login = () => { | |
disabled={loading ? 'disabled' : ''} | ||
type="submit"> | ||
Login | ||
</button> | ||
<Link href="/register"> | ||
<a className="btn btn-secondary ml-2">Register</a> | ||
</button> | ||
<Link className="btn btn-secondary ml-2" href="/register"> | ||
Register | ||
</Link> | ||
</div> | ||
|
||
|
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.
@Souptik2001 Let's segregate these with comments, Internal dependencies and external dependencies resp. Lets do that where applicable.
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.
@imranhsayed Just to be once confirmed you meant like this right? -
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.
Exactly @Souptik2001 Looks more organised.
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.
Resolved.
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.
@Souptik2001 When we assign the issue back for review, it's the reviewer who will mark the comments resolved after checking.
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.
@Souptik2001 Let's rename the comments to
Internal Dependencies
andExternal Dependencies
respectively.