mirror of
https://github.com/logos-storage/logos-storage-marketplace-ui.git
synced 2026-01-07 16:03:06 +00:00
Fix rerender issue with sunbuster component
This commit is contained in:
parent
d72c61e45b
commit
0c749a9859
@ -140,7 +140,7 @@ export function AvailabilitySheetCreate({
|
||||
className={className}
|
||||
/>
|
||||
|
||||
<Sheets open={state.open} onClose={onClose} mode="bottom">
|
||||
<Sheets open={state.open} onClose={onClose}>
|
||||
<Stepper
|
||||
className="availabilityCreate"
|
||||
titles={steps.current}
|
||||
|
||||
@ -2,7 +2,7 @@ import { CodexNodeSpace } from "@codex-storage/sdk-js";
|
||||
import { Times } from "../../utils/times";
|
||||
import { Strings } from "../../utils/strings";
|
||||
import { PrettyBytes } from "../../utils/bytes";
|
||||
import { useRef, useState } from "react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { CallbackDataParams, ECBasicOption } from "echarts/types/dist/shared";
|
||||
import * as echarts from "echarts";
|
||||
import { availabilityColors } from "./availability.colors";
|
||||
@ -19,10 +19,12 @@ export function AvailabilitySunburst({ availabilities, space }: Props) {
|
||||
const chart = useRef<echarts.EChartsType | null>(null);
|
||||
const [, setRefresher] = useState(Date.now());
|
||||
|
||||
if (div.current && !chart.current) {
|
||||
chart.current = echarts.init(div.current);
|
||||
setRefresher(Date.now());
|
||||
}
|
||||
useEffect(() => {
|
||||
if (div.current && !chart.current) {
|
||||
chart.current = echarts.init(div.current);
|
||||
setRefresher(Date.now());
|
||||
}
|
||||
}, [chart, div]);
|
||||
|
||||
const data = availabilities.map((a, index) => {
|
||||
return {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user