(plugin: Plugin)
| 30 | ): UserVote | undefined => { |
| 31 | let previousVote: UserVote | undefined; |
| 32 | const update = (plugin: Plugin): Plugin => { |
| 33 | if (plugin.id !== id) { |
| 34 | return plugin; |
| 35 | } |
| 36 | |
| 37 | previousVote = plugin.userVote ?? UserVote.None; |
| 38 | |
| 39 | return applyPluginVote(plugin, vote); |
| 40 | }; |
| 41 | |
| 42 | client.setQueriesData<Plugin[]>( |
| 43 | { queryKey: [RequestKey.Plugins] }, |
no test coverage detected