fix: santized success toast text after adding feeds
8c4db01d
2 file(s) · +4 −4
| 133 | 133 | const sanitizedPost = sanitizePostData( |
|
| 134 | 134 | post, |
|
| 135 | 135 | isAtom, |
|
| 136 | - | feedData.title, |
|
| 136 | + | sanitizedFeed.title, |
|
| 137 | 137 | ); |
|
| 138 | 138 | ||
| 139 | 139 | const postResult = evolu.insert("rssPost", { |
|
| 297 | 297 | ||
| 298 | 298 | for (const post of posts) { |
|
| 299 | 299 | // Sanitize post data to meet schema constraints |
|
| 300 | - | const sanitizedPost = sanitizePostData(post, isAtom, feedData.title); |
|
| 300 | + | const sanitizedPost = sanitizePostData(post, isAtom, sanitizedFeed.title); |
|
| 301 | 301 | ||
| 302 | 302 | const postResult = evolu.insert("rssPost", { |
|
| 303 | 303 | title: sanitizedPost.title, |
|
| 318 | 318 | } |
|
| 319 | 319 | ||
| 320 | 320 | toast.success( |
|
| 321 | - | `Successfully added "${feedData.title}" with ${posts.length} post${posts.length !== 1 ? "s" : ""}`, |
|
| 321 | + | `Successfully added "${sanitizedFeed.title}" with ${posts.length} post${posts.length !== 1 ? "s" : ""}`, |
|
| 322 | 322 | ); |
|
| 323 | 323 | ||
| 324 | 324 | setUrlInput(""); |
|
| 181 | 181 | } |
|
| 182 | 182 | ||
| 183 | 183 | toast.success( |
|
| 184 | - | `Successfully added "${feedData.title}" with ${posts.length} post${posts.length !== 1 ? "s" : ""}`, |
|
| 184 | + | `Successfully added "${sanitizedFeed.title}" with ${posts.length} post${posts.length !== 1 ? "s" : ""}`, |
|
| 185 | 185 | ); |
|
| 186 | 186 | ||
| 187 | 187 | onOpenChange(false); |