Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix(billboard): await CTA action so the button shows loading (#18342)

Inneie0a07b94df1d
diff --git a/src/features/Billboard/Carousel.tsx b/src/features/Billboard/Carousel.tsx
index db02e3bff78..53e37191d31 100644
--- a/src/features/Billboard/Carousel.tsx
+++ b/src/features/Billboard/Carousel.tsx
@@ -161,12 +161,10 @@ const ItemContent = memo<{ billboardSlug: string; item: BillboardItem; position:
[analytics, billboardSlug, item.id, position],
);
- const handleActionClick = useCallback(() => {
+ const handleActionClick = useCallback(async () => {
if (!action) return;
trackCtaClick({ action });
- // handlers may be async (e.g. resetOnboarding persists before navigating);
- // a failed action must never surface as an unhandled rejection on the card
- void Promise.resolve(runBillboardAction(action)).catch(() => {});
+ await Promise.resolve(runBillboardAction(action)).catch(() => {});
}, [action, trackCtaClick]);
const handleLinkClick = useCallback(() => {