autoscroll to have full streamview

This commit is contained in:
2026-06-13 15:23:50 +02:00
parent 6013bf1da4
commit c77be85fc8
+6 -2
View File
@@ -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 (
<div className="text-ctp-text flex flex-col min-h-screen px-4 py-6">
<div className="w-full text-center flex flex-col flex-1">
@@ -32,7 +36,7 @@ export default function Stream() {
))}
</div>
<div className="stream-frame w-full mx-auto flex-1 max-h-[85vh]">
<div className="flex-1 min-h-0">
<iframe
src={`https://stream.aramjonghu.nl/${activeStream}`}
title={activeStream}