import * as React from "react"; import List from "@mui/material/List"; import ListItem from "@mui/material/ListItem"; import ListItemButton from "@mui/material/ListItemButton"; import ListItemIcon from "@mui/material/ListItemIcon"; import ListItemText from "@mui/material/ListItemText"; import Checkbox from "@mui/material/Checkbox"; import IconButton from "@mui/material/IconButton"; import CommentIcon from "@mui/icons-material/Comment"; import InfoIcon from "@mui/icons-material/Info"; import { Box, Typography } from "@mui/material"; import { Spacer } from "../../common/Spacer"; export const ThingsToDoInitial = ({ myAddress, name, hasGroups, balance }) => { const [checked1, setChecked1] = React.useState(false); const [checked2, setChecked2] = React.useState(false); const [checked3, setChecked3] = React.useState(false); // const getAddressInfo = async (address) => { // const response = await fetch(getBaseApiReact() + "/addresses/" + address); // const data = await response.json(); // if (data.error && data.error === 124) { // setChecked1(false); // } else if (data.address) { // setChecked1(true); // } // }; // const checkInfo = async () => { // try { // getAddressInfo(myAddress); // } catch (error) {} // }; React.useEffect(() => { if (balance && +balance >= 6) { setChecked1(true) } }, [balance]); React.useEffect(()=> { if(hasGroups) setChecked3(true) }, [hasGroups]) React.useEffect(()=> { if(name) setChecked2(true) }, [name]) return ( Suggestion: Complete the following // // // } disablePadding > // // // } disablePadding > // // // } disablePadding > ); };