Timothy Pomeroy %!s(int64=2) %!d(string=hai) anos
pai
achega
0420fa18d4
Modificáronse 2 ficheiros con 3 adicións e 2 borrados
  1. 2 1
      components/Automation.js
  2. 1 1
      components/Management.js

+ 2 - 1
components/Automation.js

@@ -24,7 +24,8 @@ const Automation = ({
   const { data, mutate } = useSWR("/api/state", fetcher);
   const screenSize = useScreenSize();
 
-  const getTitle = (indx) => presets?.[indx]?.name || indx;
+  const getTitle = (indx) =>
+    presets?.[indx]?.name || presets?.[indx]?.n || indx;
   const getName = (v) => {
     let indx = clients?.findIndex((o) => o === v);
     return indx > -1 ? names?.[indx] : v;

+ 1 - 1
components/Management.js

@@ -189,7 +189,7 @@ const InstanceManagement = ({
   if (!presets) return null;
   return Object.keys(presets)?.map((o, i) => (
     <StyledRow key={i}>
-      <Col span={16}>{presets[o]?.name || ""}</Col>
+      <Col span={16}>{presets[o]?.name || presets[o]?.n || ""}</Col>
       <Col span={8} className="action">
         <SplitButton
           btnType="primary"