From 8a1c05abf4708add7a645e963a5e47b6b647b853 Mon Sep 17 00:00:00 2001 From: mahmed2000 Date: Fri, 20 Dec 2024 17:17:34 +0000 Subject: [PATCH] Make the error alert in OfflineEmbed closable (#4062) --- web/components/ui/OfflineEmbed/OfflineEmbed.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/web/components/ui/OfflineEmbed/OfflineEmbed.tsx b/web/components/ui/OfflineEmbed/OfflineEmbed.tsx index 7e4ac8742..e8ecd8f0e 100644 --- a/web/components/ui/OfflineEmbed/OfflineEmbed.tsx +++ b/web/components/ui/OfflineEmbed/OfflineEmbed.tsx @@ -80,6 +80,11 @@ export const OfflineEmbed: FC = ({ setLoading(false); }; + const handleErrorClose = () => { + setErrorMessage(''); + setCurrentMode(EmbedMode.FollowPrompt); + }; + const handleAccountChange = a => { setRemoteAccount(a); if (isValidFediverseAccount(a)) { @@ -104,7 +109,14 @@ export const OfflineEmbed: FC = ({
{streamName}
{errorMessage && ( - + )} {currentMode === EmbedMode.CanFollow && (