stab-hotfix

This commit is contained in:
Untone 2024-05-18 13:44:43 +03:00 committed by kvakazyambra
parent cb5c78790b
commit ed2b4ebfbf
6 changed files with 6 additions and 6 deletions

View File

@ -538,7 +538,7 @@ export const FullArticle = (props: Props) => {
{(triggerRef: (el) => void) => (
<div class={styles.shoutStatsItem} ref={triggerRef}>
<a
href={getPagePath(router, 'edit', { shoutId: props.article.id.toString() })}
href={getPagePath(router, 'edit', { shoutId: props.article?.id.toString() })}
class={styles.shoutStatsItemInner}
>
<Icon name="pencil-outline" class={styles.icon} />

View File

@ -54,7 +54,7 @@ export const AuthorBadge = (props: Props) => {
requireAuthentication(() => {
openPage(router, 'inbox')
changeSearchParams({
initChat: props.author.id.toString(),
initChat: props.author?.id.toString(),
})
}, 'discussions')
}

View File

@ -65,7 +65,7 @@ export const AuthorCard = (props: Props) => {
requireAuthentication(() => {
openPage(router, 'inbox')
changeSearchParams({
initChat: props.author.id.toString(),
initChat: props.author?.id.toString(),
})
}, 'discussions')
}

View File

@ -60,7 +60,7 @@ export const Draft = (props: Props) => {
<div class={styles.actions}>
<a
class={styles.actionItem}
href={getPagePath(router, 'edit', { shoutId: props.shout.id.toString() })}
href={getPagePath(router, 'edit', { shoutId: props.shout?.id.toString() })}
>
{t('Edit')}
</a>

View File

@ -328,7 +328,7 @@ export const ArticleCard = (props: ArticleCardProps) => {
<Popover content={t('Edit')} disabled={isActionPopupActive()}>
{(triggerRef: (el) => void) => (
<div class={styles.shoutCardDetailsItem} ref={triggerRef}>
<a href={getPagePath(router, 'edit', { shoutId: props.article.id.toString() })}>
<a href={getPagePath(router, 'edit', { shoutId: props.article?.id.toString() })}>
<Icon name="pencil-outline" class={clsx(styles.icon, styles.feedControlIcon)} />
<Icon
name="pencil-outline-hover"

View File

@ -18,7 +18,7 @@ import styles from '../styles/Create.module.scss'
const handleCreate = async (layout: LayoutType) => {
const shout = await apiClient.createArticle({ article: { layout: layout } })
redirectPage(router, 'edit', {
shoutId: shout.id.toString(),
shoutId: shout?.id.toString(),
})
}