Ignore:
Timestamp:
03/22/26 17:58:40 (4 months ago)
Author:
kikisrbinoska <srbinoskakristina07@…>
Branches:
main
Children:
73b69b2
Parents:
b62cefc
Message:

Added fixes for the login,stories management and reading lists

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapterx-frontend/src/pages/writer/CreateChapterPage.tsx

    rb62cefc racf690c  
    5656      is_published: isPublished,
    5757    }
    58     addChapter(chapter)
     58    try {
     59      await addChapter(chapter)
     60    } catch (err: any) {
     61      const msg = err?.response?.data?.message || err?.message || 'Failed to save chapter.'
     62      addToast(msg, 'error')
     63      setLoading(false)
     64      return
     65    }
    5966    addToast(isPublished ? 'Chapter published!' : 'Chapter saved as draft!')
    60     navigate(`/writer/edit-story/${storyId}`)
     67    navigate(isPublished ? `/story/${storyId}` : `/writer/edit-story/${storyId}`)
    6168    setLoading(false)
    6269  }
Note: See TracChangeset for help on using the changeset viewer.