(
e: React.FormEvent<HTMLFormElement>,
)
| 202 | await scrapeSource(data.url); |
| 203 | }; |
| 204 | const onSubmitFeed = async ( |
| 205 | e: React.FormEvent<HTMLFormElement>, |
| 206 | ): Promise<void> => { |
| 207 | e.preventDefault(); |
| 208 | |
| 209 | if (existingSource) { |
| 210 | return; |
| 211 | } |
| 212 | |
| 213 | const data = formToJson<{ rss: string }>(e.currentTarget); |
| 214 | const res = await checkIfSourceExists(data.rss); |
| 215 | if (res.source) { |
| 216 | setExistingSource(res.source); |
| 217 | } else { |
| 218 | await requestSource(data.rss); |
| 219 | } |
| 220 | }; |
| 221 | |
| 222 | const onNotificationClose = async (e: React.MouseEvent) => { |
| 223 | await setIsDismissed(true); |
nothing calls this directly
no test coverage detected