diff --git a/animations/timelines/editor.ts b/animations/timelines/editor.ts index 4d9314c1..0adefd35 100644 --- a/animations/timelines/editor.ts +++ b/animations/timelines/editor.ts @@ -128,7 +128,7 @@ const COMPONENT_LIBRARY_SEQUENCE: AnimationTimeline = [ duration: 0.5, }, ], - + [ "#library-product-description", { @@ -953,13 +953,15 @@ const CONTENT_MODELING_SEQUENCE: AnimationTimeline = [ ], ]; -export const EDITOR_TIMELINES: AnimationTimeline[] = [ - COMPONENT_LIBRARY_SEQUENCE, - REALTIME_EDITOR_SEQUENCE, - DESIGN_SYSTEM_SEQUENCE, - FULL_CODE_SEQUENCE, - APPS_INTEGRATIONS_SEQUENCE, - DESIGN_SYSTEM_SEQUENCE, - ANALYTICS_SEQUENCE, - CONTENT_MODELING_SEQUENCE, -]; +export const EDITOR_TIMELINES: { + [key: string]: AnimationTimeline; +} = { + "component-library": COMPONENT_LIBRARY_SEQUENCE, + "no-code-editing": REALTIME_EDITOR_SEQUENCE, + "design-system": DESIGN_SYSTEM_SEQUENCE, + "full-code-editing": FULL_CODE_SEQUENCE, + "integrate-extend": APPS_INTEGRATIONS_SEQUENCE, + "multivariate-testing": DESIGN_SYSTEM_SEQUENCE, + monitoring: ANALYTICS_SEQUENCE, + "content-modeling": CONTENT_MODELING_SEQUENCE, +}; diff --git a/islands/NRF/Editor.tsx b/islands/NRF/Editor.tsx index 066f2356..8eeede48 100644 --- a/islands/NRF/Editor.tsx +++ b/islands/NRF/Editor.tsx @@ -41,8 +41,6 @@ const AnimationComponents = { }; export default function Editor({ title, features }: Props) { - const currentFeature = useSignal(null); - useEffect(() => { let lastScrollY = window.scrollY; let isScrollingDown = true; @@ -116,7 +114,7 @@ export default function Editor({ title, features }: Props) { { duration: 0.3 } ); - timeline(EDITOR_TIMELINES[index]); + timeline(EDITOR_TIMELINES[target.id]); animate( `#feature-title-${index}`, diff --git a/sections/NRF/Hero.tsx b/sections/NRF/Hero.tsx index 78c02297..d32d882c 100644 --- a/sections/NRF/Hero.tsx +++ b/sections/NRF/Hero.tsx @@ -29,7 +29,7 @@ export default function Hero({ title, subtitle, cta, alert }: Props) { id="hero" class="relative bg-black min-h-screen space-y-16 lg:space-y-20" > -
+
{alert?.text && (
{alert.text} @@ -37,7 +37,7 @@ export default function Hero({ title, subtitle, cta, alert }: Props) { )}