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:
Brandon Presley 2023-08-29 11:55:21 +12:00
parent 4b1bbf2395
commit 0ba7616ea2
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ import Page from "./Page";
import Settings from "./settings";
export default function GraphsList() {
const [bests, setBests] = useState<GymSet[]>([]);
const [bests, setBests] = useState<GymSet[]>();
const [offset, setOffset] = useState(0);
const [end, setEnd] = useState(false);
const [term, setTerm] = useState("");