feat: Flow Transfer, Procedural Assist & UI Design System #97
@@ -188,11 +188,18 @@ export default function SurveyPage() {
|
||||
|
||||
const goSlide = (idx: number) => {
|
||||
setCurrentSlide(idx)
|
||||
requestAnimationFrame(() => {
|
||||
window.scrollTo({ top: 0, behavior: 'smooth' })
|
||||
})
|
||||
}
|
||||
|
||||
// Scroll to top whenever the active slide changes
|
||||
const isFirstRender = useRef(true)
|
||||
useEffect(() => {
|
||||
if (isFirstRender.current) {
|
||||
isFirstRender.current = false
|
||||
return
|
||||
}
|
||||
window.scrollTo({ top: 0, behavior: 'smooth' })
|
||||
}, [currentSlide])
|
||||
|
||||
const handleSubmit = async () => {
|
||||
setIsSubmitting(true)
|
||||
setSubmitError('')
|
||||
|
||||
Reference in New Issue
Block a user