@@ -11,7 +11,7 @@ import { SectionHeading } from 'components/Home/SectionHeading'
11
11
import { ProjectTag } from 'components/ProjectTags/ProjectTag'
12
12
import { XLButton } from 'components/buttons/XLButton'
13
13
import { HOMEPAGE } from 'constants/fathomEvents'
14
- import { PV_V1 } from 'constants/pv'
14
+ import { PV_V1 , PV_V2 } from 'constants/pv'
15
15
import {
16
16
DEFAULT_TRENDING_PROJECTS_LIMIT ,
17
17
useDBProjectsQuery ,
@@ -30,6 +30,8 @@ const HEADER_TAGS: ProjectTagName[] = [
30
30
'business' ,
31
31
]
32
32
33
+ const FIRST_PROJECT = getSubgraphIdForProject ( PV_V2 , 618 ) // roman storm
34
+
33
35
// These projects will render if there isn't enough trending projects.
34
36
const BACKUP_PROJECTS = [
35
37
getSubgraphIdForProject ( PV_V1 , 199 ) , // moondao
@@ -43,16 +45,17 @@ export function TopSection() {
43
45
DEFAULT_TRENDING_PROJECTS_LIMIT ,
44
46
)
45
47
const { data : backupProjects } = useDBProjectsQuery ( {
46
- ids : BACKUP_PROJECTS ,
48
+ ids : [ FIRST_PROJECT , ... BACKUP_PROJECTS ] ,
47
49
} )
50
+ const firstProject = backupProjects ?. [ 0 ] // hardcore the first project in the list
48
51
49
52
const remainderProjectCount =
50
53
DEFAULT_TRENDING_PROJECTS_LIMIT - ( trendingProjects ?. length ?? 0 )
51
54
52
55
const renderBackup =
53
56
trendingProjects && backupProjects && remainderProjectCount
54
57
? backupProjects
55
- . slice ( 0 , remainderProjectCount )
58
+ . slice ( 1 , remainderProjectCount )
56
59
. filter (
57
60
p =>
58
61
! trendingProjects
@@ -61,9 +64,10 @@ export function TopSection() {
61
64
)
62
65
: [ ]
63
66
64
- const renderProjects = trendingProjects
65
- ? [ ...trendingProjects , ...renderBackup ]
66
- : undefined
67
+ const renderProjects =
68
+ trendingProjects && firstProject
69
+ ? [ firstProject , ...trendingProjects , ...renderBackup ]
70
+ : undefined
67
71
68
72
return (
69
73
< SectionContainer className = "pt-6 pb-24 md:px-0 md:pt-10" >
0 commit comments