more-defined

This commit is contained in:
Untone 2024-02-17 18:13:54 +03:00
parent 0dd2736dd5
commit 560739627a
2 changed files with 5 additions and 5 deletions

View File

@ -307,10 +307,10 @@ export const EditView = (props: Props) => {
subtitleInput.current = el subtitleInput.current = el
}} }}
allowEnterKey={false} allowEnterKey={false}
value={(value) => setForm('subtitle', value)} value={(value) => setForm('subtitle', value || '')}
class={styles.subtitleInput} class={styles.subtitleInput}
placeholder={t('Subheader')} placeholder={t('Subheader')}
initialValue={form.subtitle} initialValue={form.subtitle || ''}
maxLength={MAX_HEADER_LIMIT} maxLength={MAX_HEADER_LIMIT}
/> />
</Show> </Show>

View File

@ -100,7 +100,7 @@ export const PublishSettings = (props: Props) => {
const handleTopicSelectChange = (newSelectedTopics) => { const handleTopicSelectChange = (newSelectedTopics) => {
if ( if (
props.form.selectedTopics.length === 0 || props.form.selectedTopics.length === 0 ||
newSelectedTopics.every((topic) => topic.id !== props.form.mainTopic.id) newSelectedTopics.every((topic) => topic.id !== props.form.mainTopic?.id)
) { ) {
setSettingsForm((prev) => { setSettingsForm((prev) => {
return { return {
@ -176,7 +176,7 @@ export const PublishSettings = (props: Props) => {
<div class={styles.mainTopic}>{settingsForm.mainTopic.title}</div> <div class={styles.mainTopic}>{settingsForm.mainTopic.title}</div>
</Show> </Show>
<div class={styles.shoutCardTitle}>{settingsForm.title}</div> <div class={styles.shoutCardTitle}>{settingsForm.title}</div>
<div class={styles.shoutCardSubtitle}>{settingsForm.subtitle}</div> <div class={styles.shoutCardSubtitle}>{settingsForm.subtitle || ''}</div>
<div class={styles.shoutAuthor}>{author()?.name}</div> <div class={styles.shoutAuthor}>{author()?.name}</div>
</div> </div>
</div> </div>
@ -203,7 +203,7 @@ export const PublishSettings = (props: Props) => {
variant="bordered" variant="bordered"
fieldName={t('Subheader')} fieldName={t('Subheader')}
placeholder={t('Come up with a subtitle for your story')} placeholder={t('Come up with a subtitle for your story')}
initialValue={settingsForm.subtitle} initialValue={settingsForm.subtitle || ''}
value={(value) => setSettingsForm('subtitle', value)} value={(value) => setSettingsForm('subtitle', value)}
allowEnterKey={false} allowEnterKey={false}
maxLength={100} maxLength={100}