fmt
This commit is contained in:
parent
3e2d7416b7
commit
e252ce464b
|
@ -115,15 +115,17 @@ export const TopicBadge = (props: Props) => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class={styles.stats}>
|
<div class={styles.stats}>
|
||||||
<span class={styles.statsItem}>{t('shoutsWithCount', {count: props.topic?.stat?.shouts})}</span>
|
<span class={styles.statsItem}>{t('shoutsWithCount', { count: props.topic?.stat?.shouts })}</span>
|
||||||
<span class={styles.statsItem}>{t('authorsWithCount', {count: props.topic?.stat?.authors})}</span>
|
<span class={styles.statsItem}>{t('authorsWithCount', { count: props.topic?.stat?.authors })}</span>
|
||||||
<span class={styles.statsItem}>
|
<span class={styles.statsItem}>
|
||||||
{t('FollowersWithCount', {count: props.topic?.stat?.followers})}
|
{t('FollowersWithCount', { count: props.topic?.stat?.followers })}
|
||||||
</span>
|
</span>
|
||||||
<Show when={props.topic?.stat?.comments}>
|
<Show when={props.topic?.stat?.comments}>
|
||||||
<span class={styles.statsItem}>{t('CommentsWithCount', {count: props.topic?.stat?.comments ?? 0})}</span>
|
<span class={styles.statsItem}>
|
||||||
|
{t('CommentsWithCount', { count: props.topic?.stat?.comments ?? 0 })}
|
||||||
|
</span>
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,13 +25,13 @@ export const EditPage = () => {
|
||||||
const [shout, setShout] = createSignal<Shout>(null)
|
const [shout, setShout] = createSignal<Shout>(null)
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
const loadedShout = await apiClient.getMyShout(shoutId())
|
const { shout: loadedShout, error } = await apiClient.getMyShout(shoutId())
|
||||||
console.log(loadedShout)
|
console.log(loadedShout)
|
||||||
if (loadedShout) {
|
if (error) {
|
||||||
setShout(loadedShout)
|
|
||||||
} else {
|
|
||||||
await snackbar?.showSnackbar({ type: 'error', body: t('This content is not published yet') })
|
await snackbar?.showSnackbar({ type: 'error', body: t('This content is not published yet') })
|
||||||
redirectPage(router, 'drafts')
|
redirectPage(router, 'drafts')
|
||||||
|
} else {
|
||||||
|
setShout(loadedShout)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user