💄 home button
This commit is contained in:
@@ -45,7 +45,7 @@ function StoryItem({ story, index, isActive, onClick, onContextMenu, onDragStart
|
||||
}
|
||||
|
||||
export function StorySidebar(): JSX.Element {
|
||||
const { stories, activeStoryPath, activeStoryId, activeStoryContent, isDirty, setStories, moveStory, markSaved } = useBorgesStore()
|
||||
const { stories, activeStoryPath, activeStoryId, activeStoryContent, isDirty, setStories, moveStory, markSaved, clearActiveStory } = useBorgesStore()
|
||||
const [search, setSearch] = useState('')
|
||||
const [renaming, setRenaming] = useState<string | null>(null)
|
||||
const [renameValue, setRenameValue] = useState('')
|
||||
@@ -108,6 +108,11 @@ export function StorySidebar(): JSX.Element {
|
||||
return (
|
||||
<div className="sidebar">
|
||||
<div className="sidebar-header">
|
||||
<button
|
||||
className={`sidebar-btn${!activeStoryId ? ' active' : ''}`}
|
||||
onClick={clearActiveStory}
|
||||
title="Home"
|
||||
>⌂</button>
|
||||
<span className="sidebar-title">Stories</span>
|
||||
<button className="sidebar-btn" onClick={handleNew} title="New story">+</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user