Codebase-related
- When initializing DateTimes in the frontend, set the timezone to 'America/New_York’ so that when you call .toLocaleString() it reflects EST time instead of whatever timezone the user happens to be in. That being said, we do want to be locale-agnostic so if the user prefers 24-hr time strings (instead of AM/PM), we should display it as such.
- example if we set our locale to Japan (note the lack of AM/PM)
- When writing an
onClick handler, check for ev.defaultPrevented before acting on the click. A child element may have called ev.preventDefault() as a way to “swallow” the click action while still allowing it to propagate up to the root. (as opposed to ev.stopPropagation() , which is considered bad practice in some programming circles.)
Vercel previews
- for auth to work on Vercel staging previews, we need to allow third-party cookies. (the staging backend is hosted under a different domain than the frontend previews, and cross-site cookies are counted as third-party cookies, by definition.)
Google OAuth
- Google OAuth settings can be configured in the Google Cloud Console under the following two accounts:
