stab-hotfix

This commit is contained in:
Untone 2024-05-18 13:44:43 +03:00
parent a9f732d1a4
commit 50387738f8
6 changed files with 6 additions and 6 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -328,7 +328,7 @@ export const ArticleCard = (props: ArticleCardProps) => {
<Popover content={t('Edit')} disabled={isActionPopupActive()}> <Popover content={t('Edit')} disabled={isActionPopupActive()}>
{(triggerRef: (el) => void) => ( {(triggerRef: (el) => void) => (
<div class={styles.shoutCardDetailsItem} ref={triggerRef}> <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" class={clsx(styles.icon, styles.feedControlIcon)} />
<Icon <Icon
name="pencil-outline-hover" name="pencil-outline-hover"

View File

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