Oops, forgot to put confirm dialog before boosting

pull/13/head
Lim Chee Aun 2022-12-20 10:09:05 +08:00
rodzic bf907abc17
commit 1538400dc0
1 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -455,6 +455,14 @@ function Status({
count={reblogsCount} count={reblogsCount}
onClick={async () => { onClick={async () => {
try { try {
if (!reblogged) {
const yes = confirm(
'Are you sure that you want to boost this post?',
);
if (!yes) {
return;
}
}
// Optimistic // Optimistic
states.statuses.set(id, { states.statuses.set(id, {
...status, ...status,