@@ -11,7 +11,7 @@ import { SectionHeading } from 'components/Home/SectionHeading'
1111import { ProjectTag } from 'components/ProjectTags/ProjectTag'
1212import { XLButton } from 'components/buttons/XLButton'
1313import { HOMEPAGE } from 'constants/fathomEvents'
14- import { PV_V1 } from 'constants/pv'
14+ import { PV_V1 , PV_V2 } from 'constants/pv'
1515import {
1616 DEFAULT_TRENDING_PROJECTS_LIMIT ,
1717 useDBProjectsQuery ,
@@ -30,6 +30,8 @@ const HEADER_TAGS: ProjectTagName[] = [
3030 'business' ,
3131]
3232
33+ const FIRST_PROJECT = getSubgraphIdForProject ( PV_V2 , 618 ) // roman storm
34+
3335// These projects will render if there isn't enough trending projects.
3436const BACKUP_PROJECTS = [
3537 getSubgraphIdForProject ( PV_V1 , 199 ) , // moondao
@@ -43,16 +45,17 @@ export function TopSection() {
4345 DEFAULT_TRENDING_PROJECTS_LIMIT ,
4446 )
4547 const { data : backupProjects } = useDBProjectsQuery ( {
46- ids : BACKUP_PROJECTS ,
48+ ids : [ FIRST_PROJECT , ... BACKUP_PROJECTS ] ,
4749 } )
50+ const firstProject = backupProjects ?. [ 0 ] // hardcore the first project in the list
4851
4952 const remainderProjectCount =
5053 DEFAULT_TRENDING_PROJECTS_LIMIT - ( trendingProjects ?. length ?? 0 )
5154
5255 const renderBackup =
5356 trendingProjects && backupProjects && remainderProjectCount
5457 ? backupProjects
55- . slice ( 0 , remainderProjectCount )
58+ . slice ( 1 , remainderProjectCount )
5659 . filter (
5760 p =>
5861 ! trendingProjects
@@ -61,9 +64,10 @@ export function TopSection() {
6164 )
6265 : [ ]
6366
64- const renderProjects = trendingProjects
65- ? [ ...trendingProjects , ...renderBackup ]
66- : undefined
67+ const renderProjects =
68+ trendingProjects && firstProject
69+ ? [ firstProject , ...trendingProjects , ...renderBackup ]
70+ : undefined
6771
6872 return (
6973 < SectionContainer className = "pt-6 pb-24 md:px-0 md:pt-10" >
0 commit comments