I tried my bost to fix the red errors and added to types to most objects. :D
index.tsx & api.tsx
Added types to both consts.
BskyPost.tsx
Added type Text to t in Line 41, which is an interface implemented in utils.tsx.
Further type'd image in Line 47.
App.tsx
Added "types" to option.mode to its corresponding "enums".
Added "types" to option.linkTarget to its corresponding "enums".
BskyEmbed.tsx
Added conditional type null to modaRef and modalImageRef and changed the dialog ref in the return so it's "not called before it has been assigned"
Added a types to e and image in handleModalContent
utils.tsx
Implemted interfaces Text and Reason for further descriptions of those variables.
I tried to remove any any but post was a bit too abstract, tho i really do want to find a way to un-any post as well 👀
And changed the way the timeDifference is calculated by using current.getTime() - previous.getTime();
Please let me know if anything needs polishing still!
I tried my bost to fix the red errors and added to types to most objects. :D
index.tsx & api.tsx Added types to both consts.
BskyPost.tsx Added type Text to t in Line 41, which is an interface implemented in utils.tsx. Further type'd image in Line 47.
App.tsx Added "types" to option.mode to its corresponding "enums". Added "types" to option.linkTarget to its corresponding "enums".
BskyEmbed.tsx Added conditional type null to modaRef and modalImageRef and changed the dialog ref in the return so it's "not called before it has been assigned" Added a types to e and image in handleModalContent
utils.tsx Implemted interfaces Text and Reason for further descriptions of those variables. I tried to remove any any but post was a bit too abstract, tho i really do want to find a way to un-any post as well 👀 And changed the way the timeDifference is calculated by using current.getTime() - previous.getTime();
Please let me know if anything needs polishing still!