mirror of
https://github.com/fankes/beszel.git
synced 2025-10-22 03:19:22 +08:00
remove usememo return in add system dialog
- forgot to remove this before last commit. interferes with token display.
This commit is contained in:
@@ -17,7 +17,7 @@ import { $publicKey, pb } from "@/lib/stores"
|
|||||||
import { cn, generateToken, isReadOnlyUser, tokenMap, useLocalStorage } from "@/lib/utils"
|
import { cn, generateToken, isReadOnlyUser, tokenMap, useLocalStorage } from "@/lib/utils"
|
||||||
import { useStore } from "@nanostores/react"
|
import { useStore } from "@nanostores/react"
|
||||||
import { ChevronDownIcon, ExternalLinkIcon, PlusIcon } from "lucide-react"
|
import { ChevronDownIcon, ExternalLinkIcon, PlusIcon } from "lucide-react"
|
||||||
import { memo, useEffect, useMemo, useRef, useState } from "react"
|
import { memo, useEffect, useRef, useState } from "react"
|
||||||
import { $router, basePath, Link, navigate } from "./router"
|
import { $router, basePath, Link, navigate } from "./router"
|
||||||
import { SystemRecord } from "@/types"
|
import { SystemRecord } from "@/types"
|
||||||
import { AppleIcon, DockerIcon, TuxIcon, WindowsIcon } from "./ui/icons"
|
import { AppleIcon, DockerIcon, TuxIcon, WindowsIcon } from "./ui/icons"
|
||||||
@@ -122,8 +122,7 @@ export const SystemDialog = ({ setOpen, system }: { setOpen: (open: boolean) =>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return useMemo(
|
return (
|
||||||
() => (
|
|
||||||
<DialogContent
|
<DialogContent
|
||||||
className="w-[90%] sm:w-auto sm:ns-dialog max-w-full rounded-lg"
|
className="w-[90%] sm:w-auto sm:ns-dialog max-w-full rounded-lg"
|
||||||
onCloseAutoFocus={() => {
|
onCloseAutoFocus={() => {
|
||||||
@@ -238,9 +237,7 @@ export const SystemDialog = ({ setOpen, system }: { setOpen: (open: boolean) =>
|
|||||||
<CopyButton
|
<CopyButton
|
||||||
text={t`Copy Linux command`}
|
text={t`Copy Linux command`}
|
||||||
icon={<TuxIcon className="size-4" />}
|
icon={<TuxIcon className="size-4" />}
|
||||||
onClick={async () =>
|
onClick={async () => copyLinuxCommand(isUnixSocket ? hostValue : port.current?.value, publicKey, token)}
|
||||||
copyLinuxCommand(isUnixSocket ? hostValue : port.current?.value, publicKey, token)
|
|
||||||
}
|
|
||||||
dropdownItems={[
|
dropdownItems={[
|
||||||
{
|
{
|
||||||
text: t({ message: "Homebrew command", context: "Button to copy install command" }),
|
text: t({ message: "Homebrew command", context: "Button to copy install command" }),
|
||||||
@@ -268,8 +265,6 @@ export const SystemDialog = ({ setOpen, system }: { setOpen: (open: boolean) =>
|
|||||||
</form>
|
</form>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
),
|
|
||||||
[]
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user