Skip to content
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

feat: SSR MathJax and Stripe on routes using them #37388

Conversation

ojeytonwilliams
Copy link
Contributor

  • I have read freeCodeCamp's contribution guidelines.
  • My pull request has a descriptive title (not a vague title like Update index.md)
  • My pull request targets the master branch of freeCodeCamp.
  • None of my changes are plagiarized from another source without proper attribution.
  • All the files I changed are in the same world language (for example: only English changes, or only Chinese changes, etc.)
  • My changes do not use shortened URLs or affiliate links.

Attaches scripts to the body if they're needed. Stripe for /donate and challenges and MathJax for the rosetta code challenges. This should be faster than waiting for componentDidMount before starting.

Related to #37360

@ojeytonwilliams ojeytonwilliams requested a review from a team October 18, 2019 10:58
@gitpod-io
Copy link

gitpod-io bot commented Oct 18, 2019

@ojeytonwilliams ojeytonwilliams added the platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. label Oct 18, 2019
@@ -1,8 +1,7 @@
import meta from './meta';
import mathjax from './mathjax';
import scripts from './scripts';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this file? Can we consolidate things here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scripts is empty now - it used to contain gtag. I think all the scripts are (as of this PR) in gatsby-ssr.

If that's a good place for them, we can just get rid of scripts entirely.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please. And thanks for confirming.

@raisedadead raisedadead merged commit 058e0b7 into freeCodeCamp:master Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: learn UI side of the client application that needs familiarity with React, Gatsby etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants