mirror of
https://github.com/Open-Dev-Society/OpenStock.git
synced 2026-10-02 04:54:32 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user