diff options
Diffstat (limited to 'frontend/src/components')
| -rw-r--r-- | frontend/src/components/AddFeedForm.tsx | 8 | ||||
| -rw-r--r-- | frontend/src/components/FeedList.tsx | 20 |
2 files changed, 15 insertions, 13 deletions
diff --git a/frontend/src/components/AddFeedForm.tsx b/frontend/src/components/AddFeedForm.tsx index 79e26e3..519f9e3 100644 --- a/frontend/src/components/AddFeedForm.tsx +++ b/frontend/src/components/AddFeedForm.tsx @@ -28,7 +28,9 @@ export function AddFeedForm({ onFeedAdded }: Props) { onFeedAdded?.(); } } catch (error) { - setError(error instanceof Error ? error.message : "Failed to add feed"); + setError( + error instanceof Error ? error.message : "Failed to subscribe to feed", + ); } }; @@ -47,7 +49,7 @@ export function AddFeedForm({ onFeedAdded }: Props) { <form onSubmit={handleSubmit} className="space-y-4 p-4"> <div className="rounded-lg border border-gray-200 bg-white p-4 shadow-sm"> <h3 className="text-lg font-semibold text-gray-900 mb-4"> - Add New Feed + Subscribe to New Feed </h3> <div className="flex gap-2"> <div className="flex-1"> @@ -80,7 +82,7 @@ export function AddFeedForm({ onFeedAdded }: Props) { ) : ( <FontAwesomeIcon icon={faPlus} className="mr-2" /> )} - Add Feed + Subscribe </button> </div> </div> diff --git a/frontend/src/components/FeedList.tsx b/frontend/src/components/FeedList.tsx index 7e46e78..e5b6751 100644 --- a/frontend/src/components/FeedList.tsx +++ b/frontend/src/components/FeedList.tsx @@ -9,17 +9,17 @@ import { GetFeedsDocument, MarkFeedReadDocument, MarkFeedUnreadDocument, - RemoveFeedDocument, + UnsubscribeFeedDocument, } from "../graphql/generated/graphql"; interface Props { - onFeedDeleted?: () => void; + onFeedUnsubscribed?: () => void; selectedFeeds?: Set<string>; onSelectFeed?: (feedId: string, selected: boolean) => void; } export function FeedList({ - onFeedDeleted, + onFeedUnsubscribed, selectedFeeds, onSelectFeed, }: Props) { @@ -29,7 +29,7 @@ export function FeedList({ const [, markFeedRead] = useMutation(MarkFeedReadDocument); const [, markFeedUnread] = useMutation(MarkFeedUnreadDocument); - const [, removeFeed] = useMutation(RemoveFeedDocument); + const [, unsubscribeFeed] = useMutation(UnsubscribeFeedDocument); const handleMarkAllRead = async (feedId: string) => { await markFeedRead({ id: feedId }); @@ -39,13 +39,13 @@ export function FeedList({ await markFeedUnread({ id: feedId }); }; - const handleDeleteFeed = async (feedId: string) => { + const handleUnsubscribeFeed = async (feedId: string) => { const confirmed = window.confirm( - "Are you sure you want to delete this feed?", + "Are you sure you want to unsubscribe from this feed?", ); if (confirmed) { - await removeFeed({ id: feedId }); - onFeedDeleted?.(); + await unsubscribeFeed({ id: feedId }); + onFeedUnsubscribed?.(); } }; @@ -134,9 +134,9 @@ export function FeedList({ </button> <button type="button" - onClick={() => handleDeleteFeed(feed.id)} + onClick={() => handleUnsubscribeFeed(feed.id)} className="rounded p-2 text-red-600 hover:bg-red-50 hover:text-red-700" - title="Delete feed" + title="Unsubscribe from feed" > <FontAwesomeIcon icon={faTrash} /> </button> |
