HolodexNet / Holodex

Holodex frontend source code
https://holodex.net
MIT License
532 stars 92 forks source link

Fix fetch being unauthorized when a token is present. #738

Closed miosenpai closed 10 months ago

miosenpai commented 10 months ago

The PR enables the getOnInit option on tokenAtom according to https://github.com/pmndrs/jotai/discussions/1999 so it will be populated before first use. Without this measure, other initialization tasks like createFetchClient will behave incorrectly from tokenAtom being null even when the user is logged in.