Only show the sub labels filter when there are sub labels in the DB

This commit is contained in:
Nick Mowen 2022-05-11 19:43:57 -06:00
parent 5ce478c586
commit f2409171fe

View File

@ -270,6 +270,8 @@ export default function Events({ path, ...props }) {
</option> </option>
))} ))}
</select> </select>
{
filterValues.sub_labels.length > 0 && (
<select <select
className="basis-1/5 cursor-pointer rounded dark:bg-slate-800" className="basis-1/5 cursor-pointer rounded dark:bg-slate-800"
value={searchParams.sub_label} value={searchParams.sub_label}
@ -282,6 +284,7 @@ export default function Events({ path, ...props }) {
</option> </option>
))} ))}
</select> </select>
)}
<div ref={datePicker} className="ml-auto"> <div ref={datePicker} className="ml-auto">
<CalendarIcon <CalendarIcon
className="h-8 w-8 cursor-pointer" className="h-8 w-8 cursor-pointer"