feat(reply modal): show alert before posting if subplebbit might be offline

This commit is contained in:
Tom (plebeius.eth)
2024-06-08 21:33:56 +02:00
parent a2c1ec441f
commit d71889a3de
3 changed files with 30 additions and 6 deletions
+7 -5
View File
@@ -278,11 +278,13 @@ const PostForm = () => {
const offlineAlert =
showForm &&
(updatedAt
? isBoardOffline && (
<div className={styles.offlineBoard}>{`Posts last synced ${getFormattedTimeAgo(updatedAt)}, the subplebbit might be offline and publishing might fail.`}</div>
)
: `The subplebbit might be offline and publishing might fail.`);
(updatedAt ? (
isBoardOffline && (
<div className={styles.offlineBoard}>{`Posts last synced ${getFormattedTimeAgo(updatedAt)}, the subplebbit might be offline and publishing might fail.`}</div>
)
) : (
<div className={styles.offlineBoard}>{`The subplebbit might be offline and publishing might fail.`}</div>
));
return (
<>