Fix pinned items don't show up in home
This commit is contained in:
parent
42e491b59d
commit
46eeb729c3
|
@ -465,7 +465,8 @@ export default {
|
|||
${whereClause(
|
||||
subClause(sub, 3, 'Item', me),
|
||||
muteClause(me),
|
||||
'"Item"."pinId" IS NULL',
|
||||
// in "home" (sub undefined), we want to show pinned items (but without the pin icon)
|
||||
sub ? '"Item"."pinId" IS NULL' : '',
|
||||
'"Item"."deletedAt" IS NULL',
|
||||
'"Item"."parentId" IS NULL',
|
||||
'"Item".bio = false',
|
||||
|
|
|
@ -45,11 +45,13 @@ export default function Items ({ ssrData, variables = {}, query, destructureData
|
|||
return <Skeleton />
|
||||
}
|
||||
|
||||
const isHome = !variables?.sub
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={styles.grid}>
|
||||
{itemsWithPins.filter(filter).map((item, i) => (
|
||||
<ListItem key={item.id} item={item} rank={rank && i + 1} siblingComments={variables.includeComments} pinnable={pins?.length > 0} />
|
||||
<ListItem key={item.id} item={item} rank={rank && i + 1} siblingComments={variables.includeComments} pinnable={isHome ? false : pins?.length > 0} />
|
||||
))}
|
||||
</div>
|
||||
<Foooter
|
||||
|
|
Loading…
Reference in New Issue