amiedawn / jokinator

2 stars 1 forks source link

Feature/storage handling #32

Closed joe-riley closed 3 years ago

joe-riley commented 3 years ago

Now I know I promised a practice page but just implementing this was easier.

On load StorageHandler checks to see if store exists in local storage

if it doesn't then we create a blank template of what the storage object is going to look like. If it does exist then we don't do anything. NOTE for future development, whenever we change what this object looks like, do yourself a favor and delete the object in the application tab > local storage > store object in dev tools. This also stores the api keys we are using. Every time we query an api we add to the object for the api and a list called jokes. IDK if I will get to the part where we check to see if jokes already exist before tonight but I should be able to. I just wanted to get this in before we moved on.

Sorry it took so long but I was trying to do some fancy crap late last night and had to ditch the idea this morning because I remembered an old adage, "Get it working first, make it fancy later" (actually I just made that up but I have heard people expain the same thing in way more words).