diff --git a/src/components/Topic/TopicBadge/TopicBadge.tsx b/src/components/Topic/TopicBadge/TopicBadge.tsx
index f4767986..c2679b1e 100644
--- a/src/components/Topic/TopicBadge/TopicBadge.tsx
+++ b/src/components/Topic/TopicBadge/TopicBadge.tsx
@@ -115,15 +115,17 @@ export const TopicBadge = (props: Props) => {
- {t('shoutsWithCount', {count: props.topic?.stat?.shouts})}
- {t('authorsWithCount', {count: props.topic?.stat?.authors})}
+ {t('shoutsWithCount', { count: props.topic?.stat?.shouts })}
+ {t('authorsWithCount', { count: props.topic?.stat?.authors })}
- {t('FollowersWithCount', {count: props.topic?.stat?.followers})}
+ {t('FollowersWithCount', { count: props.topic?.stat?.followers })}
- {t('CommentsWithCount', {count: props.topic?.stat?.comments ?? 0})}
+
+ {t('CommentsWithCount', { count: props.topic?.stat?.comments ?? 0 })}
+
-
+
)
}
diff --git a/src/pages/edit.page.tsx b/src/pages/edit.page.tsx
index c2aa7b4b..0feb07e1 100644
--- a/src/pages/edit.page.tsx
+++ b/src/pages/edit.page.tsx
@@ -25,13 +25,13 @@ export const EditPage = () => {
const [shout, setShout] = createSignal(null)
onMount(async () => {
- const loadedShout = await apiClient.getMyShout(shoutId())
+ const { shout: loadedShout, error } = await apiClient.getMyShout(shoutId())
console.log(loadedShout)
- if (loadedShout) {
- setShout(loadedShout)
- } else {
+ if (error) {
await snackbar?.showSnackbar({ type: 'error', body: t('This content is not published yet') })
redirectPage(router, 'drafts')
+ } else {
+ setShout(loadedShout)
}
})