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

Updating not-logged in UI #82

Merged
merged 1 commit into from
Mar 27, 2024
Merged

Updating not-logged in UI #82

merged 1 commit into from
Mar 27, 2024

Conversation

jtkabenni
Copy link
Collaborator

For an example of how to fill this template out, see this Pull Request.

Description

Updates Layout.jsx to update UI based on whether user is logged in or not.

Related Issue

#63

Acceptance Criteria

Logged in displays app as normal.
Logged out displays a text display to "Please sign in to view lists."

Type of Changes

Feature update.

Updates

Before

Screenshot 2024-03-26 at 4 31 29 PM

After

Screenshot 2024-03-26 at 4 31 12 PM

Testing Steps / QA Criteria

  1. Sign out to see "Please sign in to view lists." message on both home and list view.
  2. Sign in to see app as normal.

Copy link

Visit the preview URL for this PR (updated for commit 2c50c7a):

https://tcl-67-smart-shopping-list--pr82-feature-before-logge-ooljq4g6.web.app

(expires Tue, 02 Apr 2024 22:34:28 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 1dc6f6876568bd8a1c97781eec7984835c207f7c

<h1>Smart shopping list</h1>
{!!user ? (
<div className="Layout">
{!!user ? (
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm curious what the double !! is for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think !! evaluates something as a boolean, so in this case !!user would equal to true or false, rather than evaluating it as a truthy or falsy. In this case maybe just user ? would have been enough? But it was the way it was originally, so I just kept it. @aberger3647

Copy link
Collaborator

@aberger3647 aberger3647 left a comment

Choose a reason for hiding this comment

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

Looks good!

@jtkabenni jtkabenni self-assigned this Mar 27, 2024
@jtkabenni jtkabenni merged commit e0c9071 into main Mar 27, 2024
3 checks passed
@flbarfield flbarfield deleted the feature/before-loggedin-ui branch March 28, 2024 18:12
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