Accessing JSON for Avatars in React.js

Viewed 133
1 Answers

enter image description here

export default function App() {
      return (
        <div>
          <div>
            <Typography variant="h5">Persons</Typography>
          </div>
          <Stack direction="row" spacing={2}>
          {PersonData.map((person) => {
            return (
           
                <div>
                  <Avatar {...stringAvatar(person.avatar)} />
                  <Typography>{person.name}</Typography>
                </div>  
            );
          })}
             </Stack>
        </div>
      );
    }
Related