Skip to content

Commit

Permalink
add missing format change
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Tackett <[email protected]>
  • Loading branch information
Adam Tackett committed Dec 6, 2024
1 parent 6c7b9e8 commit dc8e30c
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,17 @@ export function SpanDetailPanel(props: {
storedFilters ? JSON.parse(storedFilters) : []
);
const [DSL, setDSL] = useState<any>({});
let data: { gantt: any[]; table: any[]; ganttMaxX: number },
setData: (data: { gantt: any[]; table: any[]; ganttMaxX: number }) => void;
let data: { gantt: any[]; table: any[]; ganttMaxX: number };
let setData: (data: { gantt: any[]; table: any[]; ganttMaxX: number }) => void;
const [localData, localSetData] = useState<{ gantt: any[]; table: any[]; ganttMaxX: number }>({
gantt: [],
table: [],
ganttMaxX: 0,
});
if (props.data && props.setData) {
[data, setData] = [props.data, props.setData];
} else {
[data, setData] = useState<{ gantt: any[]; table: any[]; ganttMaxX: number }>({
gantt: [],
table: [],
ganttMaxX: 0,
});
[data, setData] = [localData, localSetData];
}
const fullRange = [0, data.ganttMaxX * 1.1];
const [selectedRange, setSelectedRange] = useState(fullRange);
Expand Down

0 comments on commit dc8e30c

Please sign in to comment.