refactor(beszel): remove ternary operators and fix dead code
Replace all ternary operators with if/else, &&/||, or early returns. Remove unused noAnimation constant that caused lint error. Fix variable shadowing in tooltip deduplication loop.
This commit is contained in:
6 files changed
+47
-31
No files matched your search
@@ -39,13 +39,13 @@ export const WidgetBeszelSystemInput = ({ property, kind }: CommonWidgetInputPro
|
||||
<Select
|
||||
label={tInput("label")}
|
||||
description={tInput("description")}
|
||||
placeholder={isPending ? t("loading") : t("placeholder")}
|
||||
placeholder={isPending && t("loading") || t("placeholder")}
|
||||
clearable
|
||||
searchable
|
||||
nothingFoundMessage={t("noSystems")}
|
||||
data={systems}
|
||||
disabled={isError}
|
||||
error={isError ? t("loadError") : undefined}
|
||||
error={isError && t("loadError") || undefined}
|
||||
{...form.getInputProps(`options.${property}`)}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user