SPS-By-The-Numbers / sps-by-the-numbers

Repository for the website sps-by-the-numbers
MIT License
1 stars 0 forks source link

Convert transcripts directory to Typescript #17

Closed mverrey closed 1 year ago

mverrey commented 1 year ago

Add data types for the metadata we're passing around the pages. The VideoData type now uses a Date object for its date instead of a string. This makes some things easier and other things harder. The main issue is that VideoData isn't JSON serializable, so it can't be passed directly through page properties. Code that relied on this has been refactored to no longer require the entire Video.

Date comparison and manipulation is now done using date-fns functions.

Also got rid of the gnarly Promise messes and replaced with less declarative but more readable code.