-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge Next.js into main
#3116
Merged
Merged
Merge Next.js into main
#3116
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Command run: npx create-next-app@latest
Unfortunately, since the ReactLocalization object contains functions, it can't be shared between client and server (because functions can't be serialized), so in effect every page that uses localisation has to be a client component. But at least we can set the correct `lang` attribute on <html> on the server, so there's that :)
Did not do: breach icons and getLocale() (for list and date formatting).
This allows our pages to be Server Components now.
It still doesn't work at the moment because the correct redirect URL hasn't yet been set up on FxA.
Port over the existing landing page
To test, add the following two variables to your .env: NEXTAUTH_URL=http://localhost:6060 NEXTAUTH_SECRET=<generate using `openssl rand -base64 32`> You can then add <SignInButton/> to e.g. the landing page to kick off authentication.
These were added when running `next build`.
This is the same the old website did, and avoids e.g. different `init` functions overriding each other.
For `style-src`, the current website already enables 'unsafe-inline'. For script-src, it looks like we currently cannot avoid that: vercel/next.js#51039
Merged
rhelmer
approved these changes
Jun 12, 2023
mansaj
approved these changes
Jun 12, 2023
codemist
approved these changes
Jun 12, 2023
maxxcrawford
approved these changes
Jun 12, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but posting up issues I found that should fix before launch:
- "Verify Email Address" Email: Not attaching images correctly
- Breach logos not showing on
/breaches
cards - Long load / Flash of Unstyled Content (FOUC) on dashboard page
Shout out to the entire team for getting this work wrapped up so fast!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References:
Jira: MNTOR-1620
Description
This contains all the changes in the
nextjs
branch, withmain
merged into it. Most of it should already have been reviewed, but I also had to resolve a bunch of conflicts, so it's probably good if a couple of folks give it a quick scan-through to see if anything odd jumps out, and maybe run it locally as well?It is also currently deployed to https://fx-breach-alerts.herokuapp.com.