fix(sidebar): keep the Watching list inside its own scroll slot

The 'Watching' block is the only sidebar flex child that sets `min-h-0`,
so it is the only one the column is allowed to squeeze below its content
height. With a longer watchlist on a short viewport it collapsed while the
list kept painting outside the box, covering the Help / API docs / About /
Terms links and the sponsor card.

Give the list its own scroll container and keep the section label pinned.
This commit is contained in:
Yi-111-a
2026-09-29 17:49:28 +08:00
parent 0248d5d928
commit bd828f1fb8
+3 -3
View File
@@ -54,12 +54,12 @@ const Sidebar = ({ user, watchlist }: SidebarProps) => {
</Link>
</nav>
<div className="flex flex-col gap-1 min-h-0">
<p className="side-label">Watching</p>
<div className="flex min-h-0 flex-col gap-1">
<p className="side-label shrink-0">Watching</p>
{watchlist.length === 0 ? (
<p className="px-2.5 text-[12.5px] text-faint">Star a stock to pin it here.</p>
) : (
<ul className="flex flex-col gap-0.5">
<ul className="scrollbar-hide-default flex min-h-0 flex-col gap-0.5 overflow-y-auto">
{watchlist.map(({ symbol, company }) => (
<li key={symbol}>
<Link