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

Refactor codebase and fix TS issues #94

Merged
merged 19 commits into from
Dec 11, 2023
Merged

Refactor codebase and fix TS issues #94

merged 19 commits into from
Dec 11, 2023

Conversation

pookmish
Copy link
Contributor

@pookmish pookmish commented Dec 7, 2023

  • Eliminited pages router
  • removed su- class prefix
  • Fixed many many TS issues
  • Fixed more ts issues

READY FOR REVIEW/NOT READY

  • (Edit the above to reflect status)

Summary

  • TL;DR - what's this PR for?

Review By (Date)

  • When does this need to be reviewed by?

Urgency

  • How critical is this PR?

Steps to Test

  1. Do this
  2. Then this
  3. Then this

Affected Projects or Products

  • Does this PR impact any particular projects, products, or modules?

Associated Issues and/or People

  • JIRA ticket
  • Other PRs
  • Any other contextual information that might be helpful (e.g., description of a bug that this PR fixes, new functionality that it adds, etc.)
  • Anyone who should be notified? (@mention them here)

See Also

Copy link

vercel bot commented Dec 7, 2023

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

Name Status Preview Updated (UTC)
su-library ✅ Ready (Inspect) Visit Preview Dec 11, 2023 3:03pm

Copy link

vercel bot commented Dec 8, 2023

Deployment failed with the following error:

Redirect at index 0 has segment ":url" in `destination` property but not in `source` or `has` property.

Learn More: https://vercel.link/invalid-route-destination-segment

@pookmish pookmish merged commit 17af7ef into 1.x Dec 11, 2023
3 checks passed
@pookmish pookmish deleted the refactor-prefix branch December 11, 2023 15:35
// Opt out of caching for all data requests in the route segment
export const dynamic = 'force-dynamic';
export const revalidate = 0;
export const revalidate = 2592000;
Copy link
Member

Choose a reason for hiding this comment

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

Can you tell me more about why you chose 30 days? Why not cache forever?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤷 Just a number i chose.

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 figured we had it at 1 day before, this is more cache. If we have no issues with this, we can increase it to infinite

Copy link
Member

Choose a reason for hiding this comment

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

Are you using this route? If not, perhaps delete it as it caused me some confusion when I first stumbled upon it.

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 kept it in case it eventually works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and also to test it out to find out if it works.

@@ -32,14 +33,16 @@ export const metadata = {
}
}

export const revalidate = 86400;
Copy link
Member

Choose a reason for hiding this comment

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

Can you tell me more about this revalidation time? Why only one day here but 30 on the page route? Wouldn't you want the layout to be cached longer than the slots?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This allows the menu to revalidate more frequent since the page invalidation doesn't invalidate that.

},
]
};
ignoreBuildErrors: process.env.CI !== 'true',
Copy link
Member

Choose a reason for hiding this comment

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

What build errors are causing you issues?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

here it actually doesn't have an issue. but if we ever do a yarn install --prod in vercel, it will cause build errors. This keeps the build errors in Github Actions

"axios": "^1.1.3",
"critters": "^0.0.20",
"decanter": "^7.0.0-rc.2",
"drupal-jsonapi-params": "^2.0.0",
"html-react-parser": "^5.0.6",
"jsona": "^1.11.0",
"next": "^14.0.1",
"next": "^13.0",
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 not working in Next 14 that you had to roll back?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The route interception kept throwing errors. I debugged it for a few hours and then this seemed to fix it. Not sure exactly why that solved the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants