feat: improve search command results rendering with conditional display
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user