Prevent empty graphs flickering
If `bests` is always an empty array then our logic for detecting zero graphs is wrong. Now when we haven't loaded any data `bests` is undefined instead of []
This commit is contained in:
parent
4b1bbf2395
commit
0ba7616ea2
|
@ -16,7 +16,7 @@ import Page from "./Page";
|
||||||
import Settings from "./settings";
|
import Settings from "./settings";
|
||||||
|
|
||||||
export default function GraphsList() {
|
export default function GraphsList() {
|
||||||
const [bests, setBests] = useState<GymSet[]>([]);
|
const [bests, setBests] = useState<GymSet[]>();
|
||||||
const [offset, setOffset] = useState(0);
|
const [offset, setOffset] = useState(0);
|
||||||
const [end, setEnd] = useState(false);
|
const [end, setEnd] = useState(false);
|
||||||
const [term, setTerm] = useState("");
|
const [term, setTerm] = useState("");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user