dsfai2020 / Task-and-Nutrition-Manager

An agile planning application that tracks tasks, ideas and nutrition goals. This app is designed to assist with everyday productivity, progress tracking and fitness.
1 stars 0 forks source link

Cards are not loading in when the program launches despite having the correct keys to pull from #64

Closed dsfai2020 closed 3 months ago

dsfai2020 commented 3 months ago

Describe the bug When the page loads I'd like for the ui cards to load for each one in the local storage.

To Reproduce Steps to reproduce the behavior:

  1. Go to the page and press control shift I to view the local storage.
  2. Click on on the local storage.
  3. Scroll down to the contents.
  4. See error. Notice that there are ui records in the local storage but the page is not generating the cards from them.

Expected behavior I'm expecting that the page create a card the same way that card is created when the add button happens. Except I want the cards to automatically create if the page detects that there are ui states stored in the local browser. I want it to construct a card for each of the records contained in the local storage.

Screenshots image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context This feature is still under development. I am using pytest to check validate any changes made to the local storage. I am also using Jest to create JS unit tests for basic purposes.

dsfai2020 commented 3 months ago

Now that #67 is resolved I should be able make the page populate ui based on whether or not the local storage contains any ui card data. My Hypothesis for this to work is that I'll use a conditional render to populate the components by calling it for a set amount of times with the proper information they need and if it doesn't detect any keys for that condition than it'll render a regular page setup with just one ui card as usual.

dsfai2020 commented 3 months ago

Issue #69 has officially resolved this issue. There are more bugs related to it regarding changes made to these cards being generated and saved properly into the local storage. Also with different props that may need to be cross examined and tested for cards loaded in but as of now THIS issue is resolved and a new issue will be created for any of those problems in the near future.