Skip to content

fix(home): show favorite hearts on Home grid for authenticated users - #68

Merged
devhasson merged 1 commit into
mainfrom
65-issue-front-25-historico-coração-de-favorito-não-aparece-na-home-só-na-busca
Jun 25, 2026

Hidden character warning

The head ref may contain hidden characters: "65-issue-front-25-historico-cora\u00e7\u00e3o-de-favorito-n\u00e3o-aparece-na-home-s\u00f3-na-busca"
Merged

fix(home): show favorite hearts on Home grid for authenticated users#68
devhasson merged 1 commit into
mainfrom
65-issue-front-25-historico-coração-de-favorito-não-aparece-na-home-só-na-busca

Conversation

@devhasson

Copy link
Copy Markdown
Collaborator

Thread isAuthed from the server page down to DiscoverGrid, which now derives favoritedKeys via useProfile (same source/queryKey as Search) and passes them to SearchResultsGrid in all rendering paths.

Thread isAuthed from the server page down to DiscoverGrid, which now
derives favoritedKeys via useProfile (same source/queryKey as Search)
and passes them to SearchResultsGrid in all rendering paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 25, 2026 18:25

@joaovictorBC joaovictorBC left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Aprovado

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR ensures the Home “Discover” grid can render favorite-heart indicators for authenticated users by threading an isAuthed signal from the server-rendered Home page down into the client grid, where favorite keys are derived from the profile query and passed into the shared results grid.

Changes:

  • Make the Home page server component async and derive isAuthed via getMe().
  • Update HomeDiscover/DiscoverGrid to accept isAuthed and use it to conditionally enable useProfile.
  • Compute favoritedKeys from the profile’s favoritos and pass them to SearchResultsGrid across all discover rendering paths (genre + trending/error fallback).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/app/page.tsx Fetches current user server-side and passes isAuthed into the Home discover section.
src/modules/titles/components/HomeDiscover.tsx Accepts isAuthed and forwards it to DiscoverGrid.
src/modules/titles/components/DiscoverGrid.tsx Conditionally loads profile favorites and passes favoritedKeys to SearchResultsGrid in all paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/modules/titles/components/DiscoverGrid.tsx
@devhasson
devhasson merged commit 43b9368 into main Jun 25, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ISSUE-FRONT-25 — [historico] Coração de favorito não aparece na Home (só na busca)

5 participants