apifix
This commit is contained in:
parent
c6ea1eb8b7
commit
582a80d34d
|
@ -20,8 +20,8 @@ import { FullTopic } from '../Topic/Full'
|
|||
import { Loading } from '../_shared/Loading'
|
||||
import { ArticleCardSwiper } from '../_shared/SolidSwiper/ArticleCardSwiper'
|
||||
|
||||
// FIXME: should be 'last_comment' and 'comments_stat' or just one?
|
||||
export type TopicFeedSortBy = 'comments' | '' | 'recent' | 'viewed' | 'rating' | 'commented'
|
||||
// FIXME: should be 'last_reacted_at' and 'comments_stat' or just one?
|
||||
export type TopicFeedSortBy = 'comments' | '' | 'recent' | 'viewed' | 'rating' | 'last_reacted_at'
|
||||
|
||||
interface Props {
|
||||
topic: Topic
|
||||
|
|
|
@ -76,7 +76,7 @@ export default (props: RouteSectionProps<{ shouts: Shout[]; topics: Topic[] }>)
|
|||
const order =
|
||||
(props.params.order && paramPattern.test(props.params.order)
|
||||
? props.params.order === 'hot'
|
||||
? 'last_comment'
|
||||
? 'last_reacted_at'
|
||||
: props.params.order
|
||||
: 'created_at') || 'created_at'
|
||||
|
||||
|
@ -112,7 +112,7 @@ export default (props: RouteSectionProps<{ shouts: Shout[]; topics: Topic[] }>)
|
|||
return (
|
||||
(paramOrderPattern.test(props.params.order)
|
||||
? props.params.order === 'hot'
|
||||
? 'last_comment'
|
||||
? 'last_reacted_at'
|
||||
: props.params.order
|
||||
: 'created_at') || 'created_at'
|
||||
)
|
||||
|
|
|
@ -76,7 +76,7 @@ export default (props: RouteSectionProps<{ shouts: Shout[]; topics: Topic[] }>)
|
|||
return (
|
||||
(paramOrderPattern.test(props.params.order)
|
||||
? props.params.order === 'hot'
|
||||
? 'last_comment'
|
||||
? 'last_reacted_at'
|
||||
: props.params.order
|
||||
: 'created_at') || 'created_at'
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user