Relayout the previous catchups list

This commit is contained in:
Lim Chee Aun 2024-03-02 10:01:22 +08:00
parent beed3ca18c
commit 7ab6da5e9b

View file

@ -713,28 +713,30 @@ function Catchup() {
{formatRange( {formatRange(
new Date(pc.startAt), new Date(pc.startAt),
new Date(pc.endAt), new Date(pc.endAt),
)}{' '} )}
<small class="ib insignificant">
{pc.count} posts
</small>
</span> </span>
</Link>{' '} </Link>{' '}
<button <span>
type="button" <small class="ib insignificant">
class="light danger small" {pc.count} posts
onClick={async () => { </small>{' '}
const yes = confirm('Remove this catch-up?'); <button
if (yes) { type="button"
let t = showToast(`Removing Catch-up ${pc.id}`); class="light danger small"
await db.catchup.del(pc.id); onClick={async () => {
t?.hideToast?.(); const yes = confirm('Remove this catch-up?');
showToast(`Catch-up ${pc.id} removed`); if (yes) {
reloadCatchups(); let t = showToast(`Removing Catch-up ${pc.id}`);
} await db.catchup.del(pc.id);
}} t?.hideToast?.();
> showToast(`Catch-up ${pc.id} removed`);
<Icon icon="x" /> reloadCatchups();
</button> }
}}
>
<Icon icon="x" />
</button>
</span>
</li> </li>
))} ))}
</ul> </ul>