change recent contributions to a link#1451
Conversation
|
🚅 Deployed to the open-tacos-pr-1451 environment in open-tacos
|
There was a problem hiding this comment.
Pull request overview
Updates the homepage “Latest Contributions” area to be a lightweight link to the /edit page, and disables the recent contributions map section to avoid build-time issues.
Changes:
- Replaces the “Latest Contributions” placeholder UI with a card-style link to
/edit. - Removes Suspense + skeleton usage around LatestContributions on the homepage.
- Comments out the recent contributions map section and related history-fetch scaffolding on the homepage.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/app/(default)/page.tsx | Simplifies the homepage contributions section and comments out the map/history logic. |
| src/app/(default)/components/LatestContributions.tsx | Reworks LatestContributions into a SectionContainer card that links to /edit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| </Container> | ||
| <SectionContainer header={<h2>Latest Contributions</h2>}> | ||
| <Link | ||
| href='/edit' |
There was a problem hiding this comment.
This link points to /edit, which (per this file’s comments) triggers a large server fetch (~6MB). With Next.js default link prefetching, the homepage may still background-prefetch /edit and incur that cost. Consider setting prefetch={false} for this Link (or otherwise disabling prefetch) to avoid reintroducing the expensive request during normal homepage browsing.
| href='/edit' | |
| href='/edit' | |
| prefetch={false} |
| // Temporarily disabled to test if this is causing build failures | ||
| // let history: ChangesetType[] = [] | ||
| // try { | ||
| // history = await getChangeHistoryServerSide() | ||
| // } catch (error) { | ||
| // console.error('Failed to fetch change history during build:', error) | ||
| // // Continue with empty history if API is down | ||
| // } | ||
| const history: never[] = [] | ||
| // const history: never[] = [] |
There was a problem hiding this comment.
There’s a large block of commented-out logic for fetching history. If this is meant to be a temporary rollback for build stability, it would be more maintainable to either remove the dead code entirely or gate it behind a feature flag/TODO that links to an issue describing when/how it will be re-enabled.
| {/* Temporarily disabled to test if this is causing build failures */} | ||
| {/* <div className='lg:col-span-2 h-[450px]'> | ||
| <RecentContributionsMap history={history} /> | ||
| </div> | ||
| </div> | ||
| </div> */} |
There was a problem hiding this comment.
PR description says the unused map was removed, but the map is still present as commented-out JSX. Either remove the map code entirely (and related imports) if it’s not needed, or update the PR description to reflect that it’s only temporarily disabled.
name: Pull request
about: Create a pull request
title: ''
labels: ''
assignees: @mikeschen
What type of PR is this?(check all applicable)
Description
Link for Latest Contributions , removed unused Map
Related Issues
Issue #
What this PR achieves
Screenshots, recordings
Notes