one-article-fix

This commit is contained in:
Untone 2024-07-09 17:13:36 +03:00
parent d255f6f0b1
commit 6602f48693
2 changed files with 4 additions and 2 deletions

View File

@ -28,7 +28,9 @@ export const route = {
export default (props: RouteSectionProps<{ articles: Shout[] }>) => { export default (props: RouteSectionProps<{ articles: Shout[] }>) => {
const params = useParams() const params = useParams()
const articles = createAsync(async () => props.data.articles || (await fetchTopicShouts(params.slug)) || []) const articles = createAsync(
async () => props.data.articles || (await fetchTopicShouts(params.slug)) || []
)
const { topicEntities } = useTopics() const { topicEntities } = useTopics()
const { t } = useLocalize() const { t } = useLocalize()
const topic = createMemo(() => topicEntities?.()[params.slug]) const topic = createMemo(() => topicEntities?.()[params.slug])