Skip to content

Commit b97e8fa

Browse files
Sai Sridharclaude
andcommitted
Show calendar event link in toast instead of popup (popup gets blocked by browser)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5b6bbbb commit b97e8fa

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

frontend/pages/email/[id].tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,8 +1035,11 @@ export default function EmailDetailPage() {
10351035
description: `${meetingInfo.agenda || ''}\n\nFrom: ${email.from_name || email.from_email}\nProposed: ${(meetingInfo.proposed_times || []).join(', ')}`,
10361036
duration_hours: meetingInfo.duration_hint?.includes('30') ? 0.5 : 1,
10371037
});
1038-
toast.success('Event added to Google Calendar!');
1039-
if (result.html_link) window.open(result.html_link, '_blank', 'noopener');
1038+
toast.success(
1039+
result.html_link
1040+
? <span>Event created! <a href={result.html_link} target="_blank" rel="noopener noreferrer" className="underline font-semibold">View in Calendar →</a></span>
1041+
: 'Event added to Google Calendar!'
1042+
);
10401043
} catch {
10411044
toast.error('Failed to create event. Try again.');
10421045
} finally {

0 commit comments

Comments
 (0)