Skip to content

Commit

Permalink
use named export
Browse files Browse the repository at this point in the history
  • Loading branch information
barbalex committed Oct 29, 2024
1 parent 44d9c94 commit 1d2c81d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/Projekte/TreeContainer/Tree/Row.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { useSnackbar } from 'notistack'
import isNodeInActiveNodePath from '../isNodeInActiveNodePath.js'
import isNodeOrParentInActiveNodePath from '../isNodeOrParentInActiveNodePath.js'
import isNodeOpen from '../isNodeOpen.js'
import toggleNode from './toggleNode.js'
import { toggleNode } from './toggleNode.js'
import { toggleNodeSymbol } from './toggleNodeSymbol.js'
import { StoreContext } from '../../../../storeContext.js'
import { ContextMenuTrigger } from '../../../../modules/react-contextmenu/index.js'
Expand Down
6 changes: 2 additions & 4 deletions src/components/Projekte/TreeContainer/Tree/toggleNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getSnapshot } from 'mobx-state-tree'
import isNodeOpen from '../isNodeOpen'
import openNode from '../openNode'

const toggleNode = ({ node, store, navigate, search }) => {
export const toggleNode = ({ node, store, navigate, search }) => {
if (!node.url) throw new Error('passed node has no url')
const {
openNodes: openNodesRaw,
Expand All @@ -20,7 +20,7 @@ const toggleNode = ({ node, store, navigate, search }) => {
openNode({ node, openNodes, store })
newActiveNodeArray = [...node.url]
// some elements are numbers but they are contained in url as text
// eslint-disable-next-line eqeqeq
} else if (node.urlLabel == aNA.slice(-1)[0]) {
// the node is open
// AND it is the active node
Expand All @@ -36,5 +36,3 @@ const toggleNode = ({ node, store, navigate, search }) => {
navigate(`/Daten/${newActiveNodeArray.join('/')}${search}`)
setLastTouchedNode(node.url)
}

export default toggleNode

0 comments on commit 1d2c81d

Please sign in to comment.