fix: ensure selection is cleared on entry change

- Added a useEffect hook to clear selection whenever the entryId changes, improving the component's responsiveness to entry updates.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-11-20 21:54:09 +08:00
parent 30fffb9965
commit 4e3e1c1513
@@ -91,6 +91,10 @@ export const ArticleLayout: React.FC<EntryLayoutProps> = ({
handleSelectionClear()
}, [showTranscript, handleSelectionClear])
useEffect(() => {
handleSelectionClear()
}, [entryId, handleSelectionClear])
if (!entry) return null
return (