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