Somewhere I can keep notes of things I have done and found helpful.
I pulled in data from AirTable via the api and used that in a displaying cards for each record. I needed to find away to use the data.
I had 2 options useEffect in the component or create a node and use a staticQuery to pull the data into a component. I found Paul Scanlon's article that explained each piece really well. I used his example and modified it some. This was really exciting challenge that I conquered in a day!
Here is the gatsby-config file and the card file where the data is pulled in.
Date: 2023 January 29
Includes() very helpful for dupes
I created cards that display content and tags for they type of content for each card. I wanted to create a filter as there are a ton of cards and tags.
I found this tutorial video that I followed and worked out well for the first iteration of the filer. I then got stuck on cards with multiple tags.
In this tutorial we used a string for the tag. But that won't work for multiple items with out more headache. With help from a teammate to walk through the steps realized needed to change to an array of strings.
We had another problem with dupes after combining all the separate arrays. He showed me that using Includes() method that will clean up those dupes.
This is my note to remember to use Includes() when dealing with duplicates!!
Date: 2023 February 01