Refactor footer link pages to use slug-based routing and improve safety - #213
Open
dhruv-v07 wants to merge 2 commits into
Open
Refactor footer link pages to use slug-based routing and improve safety#213dhruv-v07 wants to merge 2 commits into
dhruv-v07 wants to merge 2 commits into
Conversation
Changes: - Refactored 8 footer link pages to fetch by slug instead of hardcoded page IDs - Added proper error handling and 404 responses for missing pages - Added documentation comments to explain each page's purpose - Standardized code structure across all footer pages following page/[slug].jsx pattern - Improved safety with better null/undefined checks using strict equality Pages refactored: - privacy.jsx - staff.jsx (preserved custom styles) - submit.jsx - editorial-board.jsx - records-requests.jsx - join-the-daily-bruin.jsx - the-daily-bruin-community-guide.jsx - daily-bruin-intern-descriptions.jsx - page/[slug].jsx This follows the 4-step refactoring guide: made code readable, modular, safe, and documented.
NarekGermirlian
requested changes
Feb 11, 2026
NarekGermirlian
left a comment
Collaborator
There was a problem hiding this comment.
Delete all of the separate page files. They are unnecessary and can all be found through page/[slug].jsx. Make sure to redirect all footer links under components/MainSiteFooter/index.jsx to /page/[the_page_slug]
…[slug] Removed unnecessary individual page files (privacy, staff, submit, editorial-board, records-requests, join-the-daily-bruin, the-daily-bruin-community-guide, daily-bruin-intern-descriptions) since they are all handled by page/[slug].jsx. Updated MainSiteFooter links to point to /page/[slug] accordingly. Made-with: Cursor
NarekGermirlian
requested changes
Apr 8, 2026
NarekGermirlian
left a comment
Collaborator
There was a problem hiding this comment.
Good! Partially finished; do the same thing for the pages "about", "advertise" (with slug "ucla-advertising-and-marketing"), & "comment".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes:
Pages refactored:
This follows the 4-step refactoring guide: made code readable, modular, safe, and documented.