Skip to content

Commit

Permalink
chore: more debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Esinko committed Sep 6, 2024
1 parent 0ca30a7 commit 6a19e31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Document.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export default function Document({
answerRef.current.contentEditable = true

// Load active item
console.log("Loading item ...")
window.internal.ui.activeLocation = activeItem
if (activeItemData?.i) {
await window.internal.ui.editor.setContent(activeItemData.data)
Expand Down
1 change: 1 addition & 0 deletions src/components/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ export default function Sidebar(props) {
// to-do: save document before unload.
if (item.t === 0) {
props.setCreatedItem("")
console.log("[ SIDEBAR ] Set active item to:", item.i)
props.setActiveItem(item.i)
window.internal.ui.activeLocation = item.id // Todo: Move to place
if (event?.isTrusted) window.internal.ui.editor.hook.focus()
Expand Down

0 comments on commit 6a19e31

Please sign in to comment.