Integrate React frontend for desktop app
* Added component files
* Added dependencies and settings on package.json
* Updated package-lock.json to match new dependencies
* Added react scripts and config files
This commit is contained in:
1 parent
b5d87dd1eb
commit
577fb7cfab
100 files changed
+45030
-422
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import "./UserCard.css"
|
||||
import React, {useEffect} from 'react';
|
||||
import {Button, Card, CardContent, CardMedia, Typography} from "@mui/material";
|
||||
import pic from "./../../images/superalgos.png"
|
||||
|
||||
const UserCard = ({name, id,followCallback}) => {
|
||||
|
||||
useEffect(() => {
|
||||
console.log(`created user with id ${id}`)
|
||||
}, [id]);
|
||||
|
||||
return (
|
||||
<Card className="userCard" variant="outlined">
|
||||
<CardMedia className="avatar"
|
||||
component="img"
|
||||
image={pic}
|
||||
alt="PP"
|
||||
|
||||
/>
|
||||
<CardContent>
|
||||
<Typography variant="body2">{name}</Typography>
|
||||
</CardContent>
|
||||
<Button className="followButton" size="small" disableElevation variant="outlined" onClick={followCallback}>
|
||||
Follow
|
||||
</Button>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
export default UserCard;
|
||||
Reference in new issue
Block a user