Skip to content

Commit

Permalink
fix: ensure heading-analyzer updates when content changes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Mar 27, 2024
1 parent 204f5e4 commit d75df7a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions apps/demo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"paths": {
"@/core": ["../../packages/core"],
"@/core/*": ["../../packages/core/*"],
"@measured/puck": ["../../packages/core"],
"@/plugin-heading-analyzer": ["../../packages/plugin-heading-analyzer"],
"@/plugin-heading-analyzer/*": [
"../../packages/plugin-heading-analyzer/*"
Expand Down
3 changes: 2 additions & 1 deletion packages/plugin-heading-analyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"dist"
],
"devDependencies": {
"@measured/puck": "^0.13.1",
"@measured/puck": "*",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"eslint": "^7.32.0",
Expand All @@ -32,6 +32,7 @@
"react-from-json": "^0.8.0"
},
"peerDependencies": {
"@measured/puck": "^0.13.1",
"react": "^17.0.0 || ^18.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/plugin-heading-analyzer/src/HeadingAnalyzer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactElement, useEffect, useState } from "react";

import { usePuck } from "@/core/lib/use-puck";
import { usePuck } from "@measured/puck";
import { Plugin } from "@/core/types/Plugin";
import { SidebarSection } from "@/core/components/SidebarSection";
import { OutlineList } from "@/core/components/OutlineList";
Expand Down Expand Up @@ -107,7 +107,7 @@ export const HeadingAnalyzer = () => {
} else {
setHierarchy(buildHierarchy(frame));
}
}, [appState.data.content]);
}, [appState.data]);

return (
<>
Expand Down

0 comments on commit d75df7a

Please sign in to comment.