mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-07 14:09:38 +00:00
fix: conditionally render servers in dash command
This commit is contained in:
@@ -71,6 +71,8 @@ export function DashCommand() {
|
||||
<CommandInput placeholder={t("TypeCommand")} value={search} onValueChange={setSearch} />
|
||||
<CommandList>
|
||||
<CommandEmpty>{t("NoResults")}</CommandEmpty>
|
||||
{nezhaWsData.servers.length > 0 && (
|
||||
<>
|
||||
<CommandGroup heading={t("Servers")}>
|
||||
{nezhaWsData.servers.map((server) => (
|
||||
<CommandItem
|
||||
@@ -90,6 +92,8 @@ export function DashCommand() {
|
||||
</CommandItem>
|
||||
))}
|
||||
</CommandGroup>
|
||||
</>
|
||||
)}
|
||||
<CommandSeparator />
|
||||
|
||||
<CommandGroup heading={t("Shortcuts")}>
|
||||
|
||||
Reference in New Issue
Block a user