We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 601d05e commit 39cdb0dCopy full SHA for 39cdb0d
1 file changed
components/article/ToolPicker.tsx
@@ -80,11 +80,15 @@ export const ToolPicker = ({ variant = 'subnav' }: Props) => {
80
}
81
}, [])
82
83
- function onClickTool(tool: string) {
84
- setCurrentTool(tool)
+ // Whenever the currentTool is changed, update the article content
+ useEffect(() => {
85
preserveAnchorNodePosition(document, () => {
86
- showToolSpecificContent(tool)
+ showToolSpecificContent(currentTool)
87
})
88
+ }, [currentTool])
89
+
90
+ function onClickTool(tool: string) {
91
+ setCurrentTool(tool)
92
sendEvent({
93
type: EventType.preference,
94
preference_name: 'application',
0 commit comments