diff --git a/src/components/main/HomePageFilters.tsx b/src/components/main/HomePageFilters.tsx index 570f9a2a5..34cf906c8 100644 --- a/src/components/main/HomePageFilters.tsx +++ b/src/components/main/HomePageFilters.tsx @@ -38,13 +38,8 @@ const verifiedIcon = ( ) export const postFilterOpt: Filter[] = [ - { - label: 'Featured Posts', - icon: verifiedIcon, - value: 'suggested', - }, { label: 'Hot Posts', icon: '🔥', value: 'hot' }, - { label: 'All Posts', value: 'latest' }, + { label: 'Latest', value: 'latest' }, // removed most liked and commented // ...offchainPostFilterOpt, ] @@ -119,7 +114,7 @@ export const Filters = (props: Props) => { if (tabKey === 'feed' || !enableGraphQl) return null - const onFilterChange: any = (value: PostFilterType = 'suggested') => + const onFilterChange: any = (value: PostFilterType = 'hot') => setFiltersInUrl(router, tabKey, { type: value, date: date as DateFilterType }) const onDateChange: any = (value: DateFilterType = 'week') => diff --git a/src/components/main/types.ts b/src/components/main/types.ts index 91d354788..89fa65a9b 100644 --- a/src/components/main/types.ts +++ b/src/components/main/types.ts @@ -4,7 +4,7 @@ import { Dispatch } from 'react' import { AccountId } from 'src/types' import { PostKind } from '../../types/graphql-global-types' -export type PostFilterType = 'latest' | 'suggested' | 'hot' +export type PostFilterType = 'latest' | 'hot' // | 'liked' | 'commented' // removed most liked and commented export type SpaceFilterType = 'suggested' | 'latest' diff --git a/src/components/main/utils.ts b/src/components/main/utils.ts index 29bb580b5..5941380ec 100644 --- a/src/components/main/utils.ts +++ b/src/components/main/utils.ts @@ -32,12 +32,12 @@ const getPostsByFilter: GetEntityFilter = { month: q.GET_LATEST_POST_IDS, allTime: q.GET_LATEST_POST_IDS, }, - suggested: { - day: q.GET_LATEST_POST_IDS, - week: q.GET_LATEST_POST_IDS, - month: q.GET_LATEST_POST_IDS, - allTime: q.GET_LATEST_POST_IDS, - }, + // suggested: { + // day: q.GET_LATEST_POST_IDS, + // week: q.GET_LATEST_POST_IDS, + // month: q.GET_LATEST_POST_IDS, + // allTime: q.GET_LATEST_POST_IDS, + // }, hot: { day: q.GET_LATEST_POST_IDS, week: q.GET_LATEST_POST_IDS, diff --git a/src/components/posts/pinned-post.ts b/src/components/posts/pinned-post.ts index ca408f355..72559cb8f 100644 --- a/src/components/posts/pinned-post.ts +++ b/src/components/posts/pinned-post.ts @@ -1,7 +1,7 @@ import { getLastestPostIdsInSpace } from 'src/graphql/apis' import { GqlClient } from 'src/graphql/ApolloProvider' -const PINNED_POST_IDS: string[] = [] +const PINNED_POST_IDS: string[] = ['84710', '84833'] const PINNED_POST_ID = PINNED_POST_IDS[Math.floor(Math.random() * PINNED_POST_IDS.length)] const COMMUNITY_SPACE_ID = '1244'