fix install commands (#57)

* fix install commands

* allow disabling animated man

* chore: auto-fix linting and formatting issues

---------

Co-authored-by: uubulb <uubulb@users.noreply.github.com>
This commit is contained in:
UUBulb
2024-12-15 19:38:35 +08:00
committed by GitHub
parent 271bdb7f50
commit 3ec7e7a784
4 changed files with 36 additions and 31 deletions

View File

@@ -64,14 +64,19 @@ export default function Header() {
const navigate = useNavigate()
// @ts-expect-error DisableAnimatedMan is a global variable
const disableAnimatedMan = window.DisableAnimatedMan === true
return isDesktop ? (
<header className="flex pt-8 px-4 dark:bg-black/40 bg-muted border-b-[1px] overflow-visible">
<NavigationMenu className="flex flex-col items-start relative max-w-5xl mx-auto">
{!disableAnimatedMan && (
<img
className="absolute -right-0 z-[9999] top-11 w-20 scale-100 pointer-events-none"
alt={"animated-man"}
src={"/dashboard/animated-man.webp"}
/>
)}
<section className="w-full flex items-center justify-between">
<div className="flex justify-between items-center w-full">
<NavigationMenuLink

View File

@@ -29,8 +29,8 @@ export const InstallCommandsMenu = forwardRef<HTMLButtonElement, ButtonProps>((p
if (!copy) {
try {
setCopy(true)
if (!settings) throw new Error("Settings is not found.")
await copyToClipboard(generateCommand(type, settings) || "")
if (!settings.data) throw new Error("Settings is not found.")
await copyToClipboard(generateCommand(type, settings.data) || "")
} catch (e: Error | any) {
console.error(e)
toast(t("Error"), {