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

upgrade react scripts #507

Merged
merged 13 commits into from
Jun 6, 2023
Merged

upgrade react scripts #507

merged 13 commits into from
Jun 6, 2023

Conversation

vipineth
Copy link
Contributor

@vipineth vipineth commented Jun 2, 2023

[x] Upgrade react-scripts to v5


@netlify
Copy link

netlify bot commented Jun 2, 2023

Deploy Preview for vigilant-albattani-df38ec ready!

Name Link
🔨 Latest commit 19c65c5
🔍 Latest deploy log https://app.netlify.com/sites/vigilant-albattani-df38ec/deploys/647ed8365e199400085d9f4c
😎 Deploy Preview https://deploy-preview-507--vigilant-albattani-df38ec.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jun 2, 2023

Deploy Preview for superb-tarsier-e2aa29 ready!

Name Link
🔨 Latest commit 19c65c5
🔍 Latest deploy log https://app.netlify.com/sites/superb-tarsier-e2aa29/deploys/647ed836f4b4040008240de9
😎 Deploy Preview https://deploy-preview-507--superb-tarsier-e2aa29.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 2, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 19c65c5
Status: ✅  Deploy successful!
Preview URL: https://b2eb427f.gmx-interface.pages.dev
Branch Preview URL: https://upgrade-cra.gmx-interface.pages.dev

View logs

@@ -0,0 +1 @@
GENERATE_SOURCEMAP=false
Copy link
Collaborator

Choose a reason for hiding this comment

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

does it mean local server and/or test stands won't have source maps?

Copy link
Contributor Author

@vipineth vipineth Jun 2, 2023

Choose a reason for hiding this comment

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

This is set for production.

From docs:

When set to false, source maps are not generated for a production build. This solves out of memory (OOM) issues on some smaller machines.

https://create-react-app.dev/docs/advanced-configuration/

Active PR for the issue: facebook/create-react-app#11752

src/index.d.ts Outdated
@@ -0,0 +1 @@
// #
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was getting an error and it was suggested to have a file named index.d.ts. So I added that. I will look into the issue properly.

@@ -22,8 +22,7 @@ function getFeeLabel(type: FeeType) {
deposit: t`Deposit Fee`,
execution: t`Execution Fee`,
};

return i18n._(labels[type]);
return i18n._(/*i18n*/ labels[type]);
Copy link
Collaborator

@divhead divhead Jun 5, 2023

Choose a reason for hiding this comment

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

mm, is /i18n/ some kind of magic comment for lingui? Or can it be deleted?

Btw, probably this syntax is not needed as getFeeLabel is called inside component during render so language should update correctly with simple return?

return labels[type]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I tested it and works well. I have removed it now.

{ text: defineMessage({ message: "Terms and Conditions" }), link: "/terms-and-conditions" },
{ text: defineMessage({ message: "Referral Terms" }), link: "/referral-terms" },
{ text: defineMessage({ message: "Media Kit" }), link: "https://gmxio.gitbook.io/gmx/media-kit", external: true },
{ text: t`Terms and Conditions`, link: "/terms-and-conditions" },
Copy link
Collaborator

Choose a reason for hiding this comment

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

but here FOOTER_LINKS should be inside getFooterLinks function?
Otherwise they are only initialized once?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved it. Thanks for noticing.

@vipineth vipineth merged commit 19e97e5 into master Jun 6, 2023
@vipineth vipineth deleted the upgrade-cra branch June 7, 2023 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants