Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/dappforce/polkaverse into d…
Browse files Browse the repository at this point in the history
…eploy/onboarding
  • Loading branch information
teodorus-nathaniel committed Mar 5, 2024
2 parents 22597b9 + 4505de5 commit 8244756
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
9 changes: 2 additions & 7 deletions src/components/main/HomePageFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]
Expand Down Expand Up @@ -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') =>
Expand Down
2 changes: 1 addition & 1 deletion src/components/main/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
12 changes: 6 additions & 6 deletions src/components/main/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ const getPostsByFilter: GetEntityFilter<PostFilterType> = {
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,
Expand Down
2 changes: 1 addition & 1 deletion src/components/posts/pinned-post.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit 8244756

Please sign in to comment.