From c77be85fc8f70486c1c590a7f8a96ad819f89ec6 Mon Sep 17 00:00:00 2001 From: AramJonghu Date: Sat, 13 Jun 2026 15:23:50 +0200 Subject: [PATCH] autoscroll to have full streamview --- frontend/src/pages/Stream.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/Stream.jsx b/frontend/src/pages/Stream.jsx index 768ff32..5cd76bc 100644 --- a/frontend/src/pages/Stream.jsx +++ b/frontend/src/pages/Stream.jsx @@ -1,4 +1,4 @@ -import { useState } from "react"; +import { useState, useEffect } from "react"; const streams = [ { id: "aramstream", label: "Aram" }, @@ -9,6 +9,10 @@ const streams = [ export default function Stream() { const [activeStream, setActiveStream] = useState("aramstream"); + useEffect(() => { + window.scrollTo({ top: 0, behavior: "smooth" }); + }, [activeStream]); + return (
@@ -32,7 +36,7 @@ export default function Stream() { ))}
-
+