Skip to content

Commit

Permalink
clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
reiji-h committed Nov 22, 2024
1 parent 0a77342 commit 3a71b77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/app/src/client/components/TreeItem/TreeItemLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ export const TreeItemLayout: FC<TreeItemLayoutProps> = (props) => {

const { page, children } = itemNode;

const [currentChildren, setCurrentChildren] = useState<ItemNode[]>(children);
const [isOpen, setIsOpen] = useState(_isOpen);

const { data } = useSWRxPageChildren(isOpen ? page._id : null);

const [currentChildren, setCurrentChildren] = useState<ItemNode[]>(children);

const itemClickHandler = useCallback((e: MouseEvent) => {
// DO NOT handle the event when e.currentTarget and e.target is different
Expand Down

0 comments on commit 3a71b77

Please sign in to comment.