Make the error alert in OfflineEmbed closable (#4062)
This commit is contained in:
parent
0b28a3b483
commit
8a1c05abf4
@ -80,6 +80,11 @@ export const OfflineEmbed: FC<OfflineEmbedProps> = ({
|
|||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleErrorClose = () => {
|
||||||
|
setErrorMessage('');
|
||||||
|
setCurrentMode(EmbedMode.FollowPrompt);
|
||||||
|
};
|
||||||
|
|
||||||
const handleAccountChange = a => {
|
const handleAccountChange = a => {
|
||||||
setRemoteAccount(a);
|
setRemoteAccount(a);
|
||||||
if (isValidFediverseAccount(a)) {
|
if (isValidFediverseAccount(a)) {
|
||||||
@ -104,7 +109,14 @@ export const OfflineEmbed: FC<OfflineEmbedProps> = ({
|
|||||||
<div className={styles.pageName}>{streamName}</div>
|
<div className={styles.pageName}>{streamName}</div>
|
||||||
|
|
||||||
{errorMessage && (
|
{errorMessage && (
|
||||||
<Alert message="Follow Error" description={errorMessage} type="error" showIcon />
|
<Alert
|
||||||
|
message="Follow Error"
|
||||||
|
description={errorMessage}
|
||||||
|
type="error"
|
||||||
|
showIcon
|
||||||
|
closable
|
||||||
|
onClose={handleErrorClose}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{currentMode === EmbedMode.CanFollow && (
|
{currentMode === EmbedMode.CanFollow && (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user