feat: improve search command results rendering with conditional display

This commit is contained in:
poyrazavsever
2026-03-11 00:09:28 +03:00
parent 4ac6c518c6
commit 6e29f0fbf9
+5 -2
View File
@@ -92,8 +92,10 @@ export function SearchCommand({ open, onOpenChange }: SearchCommandProps) {
onValueChange={setQuery}
/>
<CommandPaletteList>
{filteredGroups.length === 0 ? (
<CommandPaletteEmpty>Sonuç bulunamadı.</CommandPaletteEmpty>
{filteredGroups.map((group, index) => (
) : (
filteredGroups.map((group, index) => (
<div key={group.id}>
{index > 0 && <CommandPaletteSeparator />}
<CommandPaletteGroup heading={group.heading}>
@@ -109,7 +111,8 @@ export function SearchCommand({ open, onOpenChange }: SearchCommandProps) {
))}
</CommandPaletteGroup>
</div>
))}
))
)}
</CommandPaletteList>
<CommandPaletteFooter className="text-xs text-muted-foreground">
Hızlıca açmak için {shortcut} kullan