Fix: Corrected blog navigation links #7844#7853
Fix: Corrected blog navigation links #7844#7853SaujanyaMagarde wants to merge 1 commit intoreactjs:mainfrom
Conversation
|
Hi @SaujanyaMagarde! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Size changesDetails📦 Next.js Bundle Analysis for react-devThis analysis was generated by the Next.js Bundle Analysis action. 🤖 Five Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 10% or more, there will be a red status indicator applied, indicating that special attention should be given to this. |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
Let's go with #7850, it was first and the date parsing shouldn't be necessary since the tree is already sorted. |
📝 Description
This PR fixes issue #7844 , where the "Previous" and "Next" navigation links on blog articles were incorrect due to unordered blog entries.
Fixes #7844
🔧 What I did:
Located the /blog route in the route tree.
Filtered blog child routes using icon === 'blog' and presence of date.
Sorted the filtered blog routes in ascending order by date, so that the navigation links reflect the correct chronological order.
✅ Result:
The blog article pages now show the correct previous and next posts based on publication date.
The issue is resolved without affecting other sections/routes.