()
| 205 | }, [hasIncrementalPowerup, plugin]); |
| 206 | |
| 207 | // Reset view mode when switching to a new rem. |
| 208 | // The default view mode is computed once `remAndType` and the user setting |
| 209 | // have resolved, in the effect below — so we clear it here. |
| 210 | useEffect(() => { |
| 211 | setViewMode(undefined); |
| 212 | setSourceDocName(undefined); |
| 213 | }, [ctx?.remId]); |
| 214 | |
| 215 | // Load source document name for highlights |
| 216 | useEffect(() => { |
| 217 | const loadSourceDocName = async () => { |
| 218 | if (remAndType?.type === 'pdf-highlight' || remAndType?.type === 'html-highlight') { |
no test coverage detected