diff --git a/apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx b/apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx index 69f03967e51..ee0fd9cef69 100644 --- a/apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx +++ b/apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx @@ -3,64 +3,93 @@ import { SmallCard } from './components' import Link from 'next/link' import Image from 'next/image' import days from './lw8_data' +import { ExpandableVideo } from 'ui' -const LWAnnouncement = ({ title }: { title?: string }) => { +const LWAnnouncement = ({ + title, + isLaunchWeekPage, +}: { + title?: string + isLaunchWeekPage?: boolean +}) => { + if (typeof document === 'undefined') return null const [_pre, d1, _d2, _d3, _d4, _d5] = days + const today = document.getElementById('today') + + const announcement = ( + <> +
+
+
+
+ + + +
+ {title ?? 'Launch Week 8: Day 1'} +
+ {d1.steps[0].title} +
+
+
+
+ + + +
+ Youtube video thumbnail +
+ + ) + + const handleClick = (e: any) => { + if (!today) return + today.scrollIntoView({ behavior: 'smooth' }) + } return (
- - -
-
-
-
- - - -
- {title ?? 'Launch Week 8: Day 1'} -
- {d1.steps[0].title} + {isLaunchWeekPage ? ( + + {announcement}
-
-
-
- - - -
- Youtube video thumbnail -
-
- + } + /> + ) : ( + + + {announcement} + + + )}
) diff --git a/apps/www/components/LaunchWeek/8/Releases/components/index.tsx b/apps/www/components/LaunchWeek/8/Releases/components/index.tsx index fc833aea991..0cf4e936dc2 100644 --- a/apps/www/components/LaunchWeek/8/Releases/components/index.tsx +++ b/apps/www/components/LaunchWeek/8/Releases/components/index.tsx @@ -220,7 +220,7 @@ export const AccordionHeader = ({ )} {shippable && shipped && youtube_id && ( -
+
- +
-
setExpandVideo(true)}>{trigger ?? }
+ ) }