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

Login Page (Design/Route) #8

Merged
merged 6 commits into from
Aug 23, 2020
Merged

Login Page (Design/Route) #8

merged 6 commits into from
Aug 23, 2020

Conversation

azoitos
Copy link
Collaborator

@azoitos azoitos commented Aug 20, 2020

@azoitos azoitos requested a review from sct August 20, 2020 03:05
src/pages/_app.tsx Outdated Show resolved Hide resolved
);
const { Component, pageProps, router } = this.props;
if (router.asPath == '/login') {
return <LoginPage {...pageProps} />;
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
return <LoginPage {...pageProps} />;
return <Component {...pageProps} />;

Let's still use Component here so that we when we have the handle the Search component when we have it in a single if statement. (ex if (router.asPath === '/login' || router.asPath === '/setup')

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated. Makes sense.

</Layout>
);
const { Component, pageProps, router } = this.props;
if (router.asPath == '/login') {
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
if (router.asPath == '/login') {
if (router.asPath === '/login') {

Strict comparison!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added! Got to used to Java.. Thanks for pointing it out.

Comment on lines 22 to 24
<p className="text-center text-gray-500 text-xs">
&copy;2020 Overseerr. All rights reserved.
</p>
Copy link
Owner

Choose a reason for hiding this comment

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

Let's remove this footer/copyright for now. We can design a better one later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed

Comment on lines 9 to 17
if (router.asPath === '/login') {
return <Component {...pageProps} />;
} else {
return (
<Layout>
<Component {...pageProps} />
</Layout>
);
}
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
if (router.asPath === '/login') {
return <Component {...pageProps} />;
} else {
return (
<Layout>
<Component {...pageProps} />
</Layout>
);
}
if (router.asPath === '/login') {
return <Component {...pageProps} />;
}
return (
<Layout>
<Component {...pageProps} />
</Layout>
);

This is a nitpick but in this case you don't actually need an else statement. You are returning inside the if block, so if the condition doesn't match, it will just skip the block and return the default.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense. Updated.

Copy link
Owner

@sct sct left a comment

Choose a reason for hiding this comment

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

LGTM. Just left one more nitpick comment.

@azoitos azoitos merged commit 1647f8c into develop Aug 23, 2020
@azoitos azoitos deleted the feature/ch41 branch August 23, 2020 01:23
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.

2 participants