diff --git a/src/components/PopularRankList.tsx b/src/components/PopularRankList.tsx index c939352..73a89f0 100644 --- a/src/components/PopularRankList.tsx +++ b/src/components/PopularRankList.tsx @@ -90,7 +90,7 @@ export function PopularRankRow({ browseSort = "popular", showRank = true, showDownload = true, - singlePostLink = false, + linkToResource = false, onFavoriteChange, }: { post: Post; @@ -99,7 +99,13 @@ export function PopularRankRow({ browseSort?: string; showRank?: boolean; showDownload?: boolean; - singlePostLink?: boolean; + /** + * When true, the card and download button route to `/resource/:id` so the + * `PostRedirect` page can fall back to the post's source language if the + * current UI language has no translation. Otherwise navigate inside the + * `/browse` stream which assumes the post exists in the current language. + */ + linkToResource?: boolean; onFavoriteChange?: (postId: string, favorited: boolean) => void; }) { const { t, lang } = useI18n(); @@ -143,10 +149,13 @@ export function PopularRankRow({