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}
|
onValueChange={setQuery}
|
||||||
/>
|
/>
|
||||||
<CommandPaletteList>
|
<CommandPaletteList>
|
||||||
|
{filteredGroups.length === 0 ? (
|
||||||
<CommandPaletteEmpty>Sonuç bulunamadı.</CommandPaletteEmpty>
|
<CommandPaletteEmpty>Sonuç bulunamadı.</CommandPaletteEmpty>
|
||||||
{filteredGroups.map((group, index) => (
|
) : (
|
||||||
|
filteredGroups.map((group, index) => (
|
||||||
<div key={group.id}>
|
<div key={group.id}>
|
||||||
{index > 0 && <CommandPaletteSeparator />}
|
{index > 0 && <CommandPaletteSeparator />}
|
||||||
<CommandPaletteGroup heading={group.heading}>
|
<CommandPaletteGroup heading={group.heading}>
|
||||||
@@ -109,7 +111,8 @@ export function SearchCommand({ open, onOpenChange }: SearchCommandProps) {
|
|||||||
))}
|
))}
|
||||||
</CommandPaletteGroup>
|
</CommandPaletteGroup>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))
|
||||||
|
)}
|
||||||
</CommandPaletteList>
|
</CommandPaletteList>
|
||||||
<CommandPaletteFooter className="text-xs text-muted-foreground">
|
<CommandPaletteFooter className="text-xs text-muted-foreground">
|
||||||
Hızlıca açmak için {shortcut} kullan
|
Hızlıca açmak için {shortcut} kullan
|
||||||
|
|||||||
Reference in New Issue
Block a user