From e259d5c33fc965088619b9019ab31e3fe39659c5 Mon Sep 17 00:00:00 2001 From: rozetko Date: Wed, 28 Dec 2022 14:46:46 +0300 Subject: [PATCH] run prettier --- .../components/Panel.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/panels/corpglory-dataexporter-panel/components/Panel.tsx b/src/panels/corpglory-dataexporter-panel/components/Panel.tsx index 5ebbd74..9d4e364 100644 --- a/src/panels/corpglory-dataexporter-panel/components/Panel.tsx +++ b/src/panels/corpglory-dataexporter-panel/components/Panel.tsx @@ -25,11 +25,11 @@ export function Panel({ options, data, width, height, timeRange, onChangeTimeRan const [dataFrame, setDataFrame] = useState(null); useEffect(() => { - if(tasks === null) { + if (tasks === null) { return; } const dataFrame = getDataFrameForTable(tasks, setTasks); - setDataFrame(dataFrame) + setDataFrame(dataFrame); }, [tasks]); useEffect(() => { @@ -38,11 +38,13 @@ export function Panel({ options, data, width, height, timeRange, onChangeTimeRan return makeRequest('/tasks', {}); } - getTasks().then(tasks => setTasks(tasks)).catch(err => console.error(err)); + getTasks() + .then((tasks) => setTasks(tasks)) + .catch((err) => console.error(err)); }, []); function onAddTaskClick(): void { - if(tasks === null) { + if (tasks === null) { return; } const configs = [...tasks, createConfigItem()]; @@ -51,9 +53,10 @@ export function Panel({ options, data, width, height, timeRange, onChangeTimeRan return (
- {dataFrame === null ? + {dataFrame === null ? ( // TODO: if datasource responds with error, display the error - : + + ) : (
@@ -68,7 +71,7 @@ export function Panel({ options, data, width, height, timeRange, onChangeTimeRan - } + )} ); }