-
Notifications
You must be signed in to change notification settings - Fork 102
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
Conversation
… feat/cowfi-caching
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat 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 dependencyTake 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 packageIf 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 riskTo ignore an alert, reply with a comment starting with
|
… feat/cowfi-caching # Conflicts: # apps/cow-fi/pages/_app.tsx # apps/cow-fi/services/ashByHq/index.ts # apps/cow-fi/services/cms/index.ts
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.
Went over maybe 30 files before I gave up.
Just skimmed over the rest. Seems ok.
Deployment failed with the following error:
View Documentation: https://vercel.com/docs/accounts/team-members-and-roles |
… feat/cowfi-caching
Report too large to display inline |
Summary
The guide: https://nextjs.org/docs/pages/building-your-application/upgrading/app-router-migration
How did I migrate the routes:
app
layout.ts
and addmetadata
with values from<Layout metaTitle={...} metaDescription="....">
from the old route OR addgenerateMetadata()
inpage.tsx
page.tsx
and move the page code from the old routeuse server
in the file beginning and extract react code tocomponents/{pageName}PageComponent.tsx
, otherwise just adduse client
in the file beginning<a>
with<Link>
fromnext/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 differentbgColor
values.To Test
See #5168