refactor(ui): separate each component into single file

This commit is contained in:
ReaJason
2025-02-28 22:40:45 +08:00
parent 30a141c8d4
commit fefe25cbce
22 changed files with 925 additions and 749 deletions
+24
View File
@@ -0,0 +1,24 @@
import { downloadBytes } from "@/lib/utils";
import { GenerateResult } from "@/types/shell";
import { useTranslation } from "react-i18next";
import { Button } from "../ui/button";
export function JarResult({ packResult, generateResult }: { packResult: string; generateResult?: GenerateResult }) {
const { t } = useTranslation();
return (
<div className="flex items-center justify-center">
<Button
type="button"
onClick={() =>
downloadBytes(
packResult,
undefined,
`${generateResult?.shellConfig.server}${generateResult?.shellConfig.shellTool}MemShell`,
)
}
>
{t("download")} Jar
</Button>
</div>
);
}