Fix phantom dropdown arrow next to Today button on desktop

The mobile view Select had md:hidden on the <select> element, but the
Select component wraps it in a <div> with an absolute ChevronDown icon
that remained visible. Moved md:hidden to a wrapper div so the entire
Select (including the chevron) is hidden on desktop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kyle 2026-03-12 15:31:44 +08:00
parent 91f929c39b
commit 39a42d08ec

View File

@ -511,15 +511,17 @@ export default function CalendarPage() {
Today Today
</Button> </Button>
<Select <div className="md:hidden">
value={currentView} <Select
onChange={(e) => changeView(e.target.value as CalendarView)} value={currentView}
className="h-8 text-sm w-auto pr-8 md:hidden" onChange={(e) => changeView(e.target.value as CalendarView)}
> className="h-8 text-sm w-auto pr-8"
{(Object.entries(viewLabels) as [CalendarView, string][]).map(([view, label]) => ( >
<option key={view} value={view}>{label}</option> {(Object.entries(viewLabels) as [CalendarView, string][]).map(([view, label]) => (
))} <option key={view} value={view}>{label}</option>
</Select> ))}
</Select>
</div>
<div className="hidden md:flex items-center rounded-md border border-border overflow-hidden"> <div className="hidden md:flex items-center rounded-md border border-border overflow-hidden">
{(Object.entries(viewLabels) as [CalendarView, string][]).map(([view, label]) => ( {(Object.entries(viewLabels) as [CalendarView, string][]).map(([view, label]) => (