Changeset 7fbb91c for chapterx-frontend/src/pages/story/StoryDetailPage.tsx
- Timestamp:
- 03/24/26 23:03:39 (3 months ago)
- Branches:
- main
- Children:
- a7550ca
- Parents:
- 73b69b2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapterx-frontend/src/pages/story/StoryDetailPage.tsx
r73b69b2 r7fbb91c 102 102 103 103 const isOwner = currentUser?.user_id === story.user_id 104 const isCollaborator = currentUser ? storyCollabs.some(c => c.user_id === currentUser.user_id) : false 104 105 105 106 return ( … … 162 163 </Button> 163 164 )} 164 { isOwner&& (165 {(isOwner || isCollaborator) && ( 165 166 <Button variant="ghost" size="sm" onClick={() => navigate(`/writer/edit-story/${story.story_id}`)}> 166 167 Edit Story … … 173 174 <div className="flex items-center justify-between mb-4"> 174 175 <h2 className="font-serif text-xl font-bold text-white">Chapters</h2> 175 { isOwner&& (176 {(isOwner || isCollaborator) && ( 176 177 <Button size="sm" onClick={() => navigate(`/writer/create-chapter/${story.story_id}`)}> 177 178 <Plus size={14} />
Note:
See TracChangeset
for help on using the changeset viewer.
