浏览代码

Fix tipos

wilitp 4 年之前
父节点
当前提交
3b0b009818
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      app/src/components/data/DegreeDay/index.tsx
  2. 1 1
      app/src/components/data/Precipitation/index.tsx

+ 1 - 1
app/src/components/data/DegreeDay/index.tsx

@@ -12,7 +12,7 @@ const colorScale = greenScale([0, 60]);
 const ResultTd = ({ value }: any) => (
   <td
     className={classes.cell}
-    style={{ backgroundColor: colorScale(value).css() as any }}
+    style={{ backgroundColor: (colorScale(value) as any).css() as any }}
   >
     {value ?? "-"}
   </td>

+ 1 - 1
app/src/components/data/Precipitation/index.tsx

@@ -13,7 +13,7 @@ const colorScale = blueScale([0, 300]);
 const ResultTd = ({ value }: any) => (
   <td
     className={classes.cell}
-    style={{ backgroundColor: colorScale(value).css() as any }}
+    style={{ backgroundColor: (colorScale(value) as any).css() as any }}
   >
     {value ?? "-"}
   </td>