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 1d2c81d commit 27094d1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 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 @@ -20,7 +20,7 @@ import { useSnackbar } from 'notistack'

import isNodeInActiveNodePath from '../isNodeInActiveNodePath.js'
import isNodeOrParentInActiveNodePath from '../isNodeOrParentInActiveNodePath.js'
import isNodeOpen from '../isNodeOpen.js'
import { isNodeOpen } from '../isNodeOpen.js'
import { toggleNode } from './toggleNode.js'
import { toggleNodeSymbol } from './toggleNodeSymbol.js'
import { StoreContext } from '../../../../storeContext.js'
Expand Down
3 changes: 1 addition & 2 deletions src/components/Projekte/TreeContainer/Tree/toggleNode.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getSnapshot } from 'mobx-state-tree'

import isNodeOpen from '../isNodeOpen'
import { isNodeOpen } from '../isNodeOpen.js'
import openNode from '../openNode'

export const toggleNode = ({ node, store, navigate, search }) => {
Expand All @@ -20,7 +20,6 @@ export 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

} else if (node.urlLabel == aNA.slice(-1)[0]) {
// the node is open
// AND it is the active node
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import isEqual from 'lodash/isEqual'
import { getSnapshot } from 'mobx-state-tree'

import isNodeOpen from '../isNodeOpen'
import { isNodeOpen } from '../isNodeOpen.js'
import isNodeInActiveNodePath from '../isNodeInActiveNodePath'

export const toggleNodeSymbol = ({ node, store, search, navigate }) => {
Expand Down
4 changes: 1 addition & 3 deletions src/components/Projekte/TreeContainer/isNodeOpen.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import isEqual from 'lodash/isEqual'

const isNodeOpen = ({ openNodes, url }) => {
export const isNodeOpen = ({ openNodes, url }) => {
if (!url) return false
if (!openNodes) return false

return openNodes.some((n) => isEqual(n, url))
}

export default isNodeOpen
2 changes: 1 addition & 1 deletion src/components/Projekte/TreeContainer/openNode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import isNodeOpen from './isNodeOpen'
import { isNodeOpen } from './isNodeOpen.js'

const openNode = async ({ node, openNodes, store }) => {
const { treeNodeLabelFilterResetExceptAp } = store
Expand Down

0 comments on commit 27094d1

Please sign in to comment.