rename long section to for you

This commit is contained in:
Hongbo Wu 2024-05-31 11:51:30 +08:00
parent 633a022825
commit 1af6cfa549
3 changed files with 9 additions and 8 deletions

View file

@ -112,7 +112,8 @@ const getJustAddedCandidates = async (
{
size: limit,
includeContent: false,
query: `in:inbox saved:last24hrs -is:seen`,
useFolders: true, // only show items in inbox folder
query: `in:inbox saved:"this week" -is:seen`,
},
userId
)
@ -147,7 +148,7 @@ const selectCandidates = async (
{
size: limit,
includeContent: false,
query: `in:inbox -saved:last24hrs -is:seen`,
query: `in:inbox -is:seen`,
},
userId
)
@ -418,7 +419,7 @@ const mixHomeItems = (
sections.push({
items: batches.long.flat().map(candidateToItem),
layout: 'long',
layout: 'for you',
})
sections.push({

View file

@ -641,8 +641,8 @@ export const functionResolvers = {
switch (section.layout) {
case 'just added':
return 'Just Added'
case 'long':
return 'Long Reads'
case 'for you':
return 'For You'
case 'quick links':
return 'Quick Links'
default:

View file

@ -65,9 +65,9 @@ export default function Home(): JSX.Element {
homeSection={homeSection}
/>
)
case 'long':
case 'for you':
return (
<LongHomeSection
<ForYouHomeSection
key={`section-${idx}`}
homeSection={homeSection}
/>
@ -117,7 +117,7 @@ const JustReadHomeSection = (props: HomeSectionProps): JSX.Element => {
)
}
const LongHomeSection = (props: HomeSectionProps): JSX.Element => {
const ForYouHomeSection = (props: HomeSectionProps): JSX.Element => {
return (
<VStack
distribution="start"