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 4fb7a645636..f6491e05f1a 100644 --- a/apps/www/components/LaunchWeek/8/Releases/components/index.tsx +++ b/apps/www/components/LaunchWeek/8/Releases/components/index.tsx @@ -167,7 +167,9 @@ export const AccordionHeader = ({ videoThumbnail?: string }) => (
)} + {shippable && shipped && ( + + )}
- {shippable && shipped && ( - - )} {shippable && !shipped && ( {shippable && shipped && youtube_id && ( -
+
(
{title} -
-
+
+
diff --git a/apps/www/components/LaunchWeek/8/Releases/index.tsx b/apps/www/components/LaunchWeek/8/Releases/index.tsx index 4d9f47eaefa..432e95e7b95 100644 --- a/apps/www/components/LaunchWeek/8/Releases/index.tsx +++ b/apps/www/components/LaunchWeek/8/Releases/index.tsx @@ -287,80 +287,71 @@ export default function LW8Releases() {
- - } - disabled={true} - className="h-[79px] hover:cursor-default" - id={day1.d.toString()} - > - {day1.steps.length > 0 && ( -
- + + {day1.steps.length > 0 && ( +
+ -
-
- {day1.steps[0].title} -

{day1.steps[0]?.description}

-
- - {day1.steps[0]?.bg_layers && - day1.steps[0]?.bg_layers?.map( - (layer, i) => - !!layer.img && ( - - +
+
+ {day1.steps[0].title} +

{day1.steps[0]?.description}

+
+ + {day1.steps[0]?.bg_layers && + day1.steps[0]?.bg_layers?.map( + (layer, i) => + !!layer.img && ( + + - - ) - )} - -
- )} - + layout="fill" + objectPosition={isTablet ? '50%' : '90% 50%'} + objectFit="contain" + /> +
+ ) + )} + +
+ )}
- +
-
setExpandVideo(true)}>{trigger ?? }
+ ) }