Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add slide duration #23 #24

Closed
wants to merge 1 commit into from
Closed

✨ Add slide duration #23 #24

wants to merge 1 commit into from

Conversation

millianapia
Copy link

No description provided.

@millianapia millianapia requested a review from a team as a code owner January 16, 2025 16:39
@millianapia millianapia requested a review from a team January 16, 2025 16:41
@BorghildSelle BorghildSelle linked an issue Jan 17, 2025 that may be closed by this pull request
@BorghildSelle BorghildSelle linked an issue Jan 17, 2025 that may be closed by this pull request
@@ -3,20 +3,37 @@
import { useEffect, useState } from 'react'
import SectionMapper from './SectionMapper'

type Slide = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These i think the Sanity typegen should have created, look at sanity.types.ts in web root

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they are based on groqs and schema documents in our studio,
so slide and slideshow should be covered by the typegen


useEffect(() => {
const interval = setInterval(() => setActiveSlideIndex((i) => (i + 1) % slideshows?.[0]?.slides.length), 30000)
if (!slides.length) return
const duration = (slides[activeSlideIndex]?.duration || 30) * 1000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When movie, show minimum video length.
Ask Mette if they need loop?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants