Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

fix(calendar): open the first URL of a multi-target post and sever the opener

Gilad Resisi9af1eb883d45
diff --git a/apps/frontend/src/components/launches/calendar.tsx b/apps/frontend/src/components/launches/calendar.tsx
index 2951e389e..c65f52aec 100644
--- a/apps/frontend/src/components/launches/calendar.tsx
+++ b/apps/frontend/src/components/launches/calendar.tsx
@@ -1130,7 +1130,15 @@ const CalendarItem: FC<{
'hidden group-hover:block hover:underline cursor-pointer',
post?.tags?.[0]?.tag?.color && 'mix-blend-difference'
)}
- onClick={() => window.open(post.releaseURL, '_blank')}
+ onClick={() =>
+ window.open(
+ // multi-target posts (several subreddits / communities /
+ // channels) join their URLs with commas: open the first one
+ post.releaseURL.split(',')[0],
+ '_blank',
+ 'noopener,noreferrer'
+ )
+ }
>
<OpenPost />
</div>