This commit is contained in:
Untone 2024-08-06 15:08:04 +03:00
parent c6ea1eb8b7
commit 582a80d34d
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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'
)

View File

@ -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'
)