Skip to content

Commit

Permalink
type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hassanad94 committed Nov 10, 2023
1 parent af062b4 commit f931aba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/sensenet/src/components/ContentBreadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const ContentBreadcrumbs = <T extends GenericContent = GenericContent>(pr
: history.push(getPrimaryActionUrl({ content: item.content, repository, uiSettings, location }))
}}
/>
{props.treeActions && selected.length > 0 ? (
{props.treeActions && selected.length > 0 ? (
<div className={classes.treeActionWrapper} data-test="tree-actions">
<Tooltip title={localization.treeActions.delete} placement="bottom">
<IconButton
Expand Down
2 changes: 1 addition & 1 deletion apps/sensenet/src/components/content/Explore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function Explore({
const pathFromUrl = useQuery().get('path')
const snRoute = useSnRoute()
const activeAction = snRoute.match!.params.action
const [selected, setSelected] = useState<T[]>([])
const [selected, setSelected] = useState<GenericContent[]>([])

const onActivateItemOverride = async (activeItem: GenericContent) => {
const expandedItem = await repository.load({
Expand Down
5 changes: 4 additions & 1 deletion apps/sensenet/src/components/tree/tree-with-data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,10 @@ export default function TreeWithData(props: TreeWithDataProps) {
}),
]

return () => subscriptions.forEach((s) => s.dispose())
return () => {
console.log('unmounting')
subscriptions.forEach((s) => s.dispose())
}
}, [
treeData,
eventHub.onContentDeleted,
Expand Down

0 comments on commit f931aba

Please sign in to comment.