mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
Merge pull request #15982 from overleaf/jel-dictionary-unlearn
[web] Only remove dictionary word from UI if unlearn request is successful GitOrigin-RevId: 03fdeb39d43892690055efcdfafb22cf89550383
This commit is contained in:
+5
-2
@@ -23,14 +23,17 @@ export default function DictionaryModalContent({
|
||||
|
||||
const handleRemove = useCallback(
|
||||
word => {
|
||||
ignoredWords.remove(word)
|
||||
runAsync(
|
||||
postJSON('/spelling/unlearn', {
|
||||
body: {
|
||||
word,
|
||||
},
|
||||
})
|
||||
).catch(debugConsole.error)
|
||||
)
|
||||
.then(() => {
|
||||
ignoredWords.remove(word)
|
||||
})
|
||||
.catch(debugConsole.error)
|
||||
},
|
||||
[runAsync]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user