the-collab-lab / tcl-23-smart-shopping-list

1 stars 2 forks source link

Join an existing shopping list with token to share and edit #20

Closed zeeatwork closed 3 years ago

zeeatwork commented 3 years ago

Description

This refactor/feature addition builds upon last week's addition of local storage functionality, token creation, and db restructuring. This Pull Request allows users to enter an existing token on the app's home page. The token is saved to localStorage and the user is shown the list associated with that token. The shopping list is stored in our Firebase DB by this unique token.

Our unique token is checked via function checkExistingToken(). If the token exists, the list is retrieved from Firebase for display and editing. If the token does not exist in our DB collection, the user is shown an error message asking to try again or create a new list.

This PR also addresses an issue from last week, removing a route check from the Home.js component and moving it to Apps.js instead (keeping all the routing in the same place).

Related Issue

closes #6

Acceptance Criteria

Type of Changes

Type
:bug: Bug fix
:sparkles: New feature
:hammer: Refactoring
:100: Add tests
:link: Update dependencies
:scroll: Docs

Updates

Before

Screen Shot 2021-04-20 at 4 08 44 PM

After

Screen Shot 2021-04-20 at 4 02 39 PM

_Site directed to after correct token entry (generatedtoken)

Screen Shot 2021-04-20 at 4 03 58 PM

Testing Steps / QA Criteria

  1. Start React App in your local environment
  2. Enter an existing token to see a test list [_generatedtoken is our current test list token]
  3. enter a random or invalid token to see error messaging and the option to generate your own token.
github-actions[bot] commented 3 years ago

Visit the preview URL for this PR (updated for commit 08e4c2d):

https://tcl-23-shopping-list--pr20-za-ar-join-existing-txmjnoo2.web.app

(expires Sun, 02 May 2021 14:21:06 GMT)

🔥 via Firebase Hosting GitHub Action 🌎