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(cow-fi): upgrade project structure to /app #5167

Merged
merged 29 commits into from
Dec 11, 2024
Merged

Conversation

shoom3301
Copy link
Collaborator

@shoom3301 shoom3301 commented Dec 6, 2024

Summary

The guide: https://nextjs.org/docs/pages/building-your-application/upgrading/app-router-migration

How did I migrate the routes:

  1. Create a directory for the route in app
  2. Create a layout.ts and add metadata with values from <Layout metaTitle={...} metaDescription="...."> from the old route OR add generateMetadata() in page.tsx
  3. Create a page.tsx and move the page code from the old route
  4. If the route fetches some data, then add use server in the file beginning and extract react code to components/{pageName}PageComponent.tsx, otherwise just add use client in the file beginning
  5. Replace <a> with <Link> from next/link

I also refactored the pages layout. We used to add <Layout> component in every page, but we should not do that.
Another point is that we have three different group of pages depending on the background color: /learn (white), /mev-blocker (cream) and others (light-pink). Thanks next.js has route groups so we can add different layouts.
Eventually, I created (learn), (main), (mev-blocker) groups with separate layouts with different bgColor values.

To Test

See #5168

Copy link

vercel bot commented Dec 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
cosmos ✅ Ready (Inspect) Visit Preview Dec 10, 2024 0:28am
cowfi ✅ Ready (Inspect) Visit Preview Dec 10, 2024 0:28am
explorer-dev ✅ Ready (Inspect) Visit Preview Dec 10, 2024 0:28am
sdk-tools ✅ Ready (Inspect) Visit Preview Dec 10, 2024 0:28am
swap-dev ✅ Ready (Inspect) Visit Preview Dec 10, 2024 0:28am
widget-configurator ✅ Ready (Inspect) Visit Preview Dec 10, 2024 0:28am

Copy link

socket-security bot commented Dec 6, 2024

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
Protestware or potentially unwanted behavior npm/[email protected]
  • Note: This package prints a protestware console message on install regarding Ukraine for users with Russian language locale
⚠︎
Protestware or potentially unwanted behavior npm/[email protected]
  • Note: The script attempts to run a local post-install script, which could potentially contain malicious code. The error handling suggests that it is designed to fail silently, which is a common tactic in malicious scripts.
⚠︎
Critical CVE npm/[email protected] ⚠︎
Possible typosquat attack npm/[email protected] ⚠︎

View full report↗︎

Next steps

What is protestware?

This package is a joke, parody, or includes undocumented or hidden behavior unrelated to its primary function.

Consider that consuming this package may come along with functionality unrelated to its primary purpose.

What is a critical CVE?

Contains a Critical Common Vulnerability and Exposure (CVE).

Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

What is a typosquat?

Package name is similar to other popular packages and may not be the package you want.

Use care when consuming similarly named packages and ensure that you did not intend to consume a different package. Malicious packages often publish using similar names as existing popular packages.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

… feat/cowfi-caching

# Conflicts:
#	apps/cow-fi/pages/_app.tsx
#	apps/cow-fi/services/ashByHq/index.ts
#	apps/cow-fi/services/cms/index.ts
Copy link
Collaborator

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

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

Went over maybe 30 files before I gave up.
Just skimmed over the rest. Seems ok.

Copy link

vercel bot commented Dec 11, 2024

Deployment failed with the following error:

You don't have permission to create a Preview Deployment for this project.

View Documentation: https://vercel.com/docs/accounts/team-members-and-roles

Copy link

Report too large to display inline

View full report↗︎

@shoom3301 shoom3301 merged commit ed152f7 into develop Dec 11, 2024
6 of 13 checks passed
@shoom3301 shoom3301 deleted the feat/cowfi-caching branch December 11, 2024 08:43
@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants