Fix tests and add changelog
This commit is contained in:
@@ -15,8 +15,14 @@ import { usePathname } from 'next/navigation'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { searchNotes } from '@/app/actions/notes'
|
||||
import { useRouter } from 'next/navigation'
|
||||
import { LabelFilter } from './label-filter'
|
||||
|
||||
export function Header() {
|
||||
interface HeaderProps {
|
||||
selectedLabels?: string[]
|
||||
onLabelFilterChange?: (labels: string[]) => void
|
||||
}
|
||||
|
||||
export function Header({ selectedLabels = [], onLabelFilterChange }: HeaderProps = {}) {
|
||||
const [searchQuery, setSearchQuery] = useState('')
|
||||
const [isSearching, setIsSearching] = useState(false)
|
||||
const [theme, setTheme] = useState<'light' | 'dark'>('light')
|
||||
@@ -86,8 +92,8 @@ export function Header() {
|
||||
</Link>
|
||||
|
||||
{/* Search Bar */}
|
||||
<div className="flex-1 max-w-2xl">
|
||||
<div className="relative">
|
||||
<div className="flex-1 max-w-2xl flex items-center gap-2">
|
||||
<div className="relative flex-1">
|
||||
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400" />
|
||||
<Input
|
||||
placeholder="Search notes..."
|
||||
@@ -96,6 +102,12 @@ export function Header() {
|
||||
onChange={(e) => handleSearch(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
{onLabelFilterChange && (
|
||||
<LabelFilter
|
||||
selectedLabels={selectedLabels}
|
||||
onFilterChange={onLabelFilterChange}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Theme Toggle */}
|
||||
|
||||
Reference in New Issue
Block a user