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,16 @@
|
||||
import React from 'react';
|
||||
import {Provider} from "react-redux";
|
||||
import reducers from "../store";
|
||||
import Root from "./Root";
|
||||
|
||||
const ReactBase = () => {
|
||||
return (
|
||||
<React.StrictMode>
|
||||
<Provider store={reducers}>
|
||||
<Root/>
|
||||
</Provider>
|
||||
</React.StrictMode>
|
||||
);
|
||||
};
|
||||
|
||||
export default ReactBase;
|
||||
@@ -0,0 +1,31 @@
|
||||
import React from 'react';
|
||||
import {BrowserRouter, Route, Routes} from 'react-router-dom';
|
||||
import App from './home/App';
|
||||
import UserProfile from "./userProfile/UserProfile";
|
||||
import NotFound from "./notFound/NotFound";
|
||||
import Feed from "./feed/Feed";
|
||||
import PostPlaceholder from "./postPlaceholder/PostPlaceholder";
|
||||
|
||||
|
||||
const Root = () => {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path='/' element={<App/>}>
|
||||
<Route path='' element={<Feed/>}/>
|
||||
<Route path='Profile' element={<UserProfile/>}>
|
||||
{/*<Route path=':profileId' element={<UserProfile/>}/>*/}
|
||||
</Route>
|
||||
<Route path='Post' element={<PostPlaceholder/>}/>
|
||||
</Route>
|
||||
<Route
|
||||
path="*"
|
||||
element={
|
||||
<NotFound/>
|
||||
}
|
||||
/>
|
||||
</Routes>
|
||||
</BrowserRouter>)
|
||||
}
|
||||
|
||||
export default Root;
|
||||
@@ -0,0 +1,17 @@
|
||||
.followButton {
|
||||
margin: 0.5rem;
|
||||
width: 3rem;
|
||||
max-height: 1.5rem;
|
||||
}
|
||||
|
||||
.userCard {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 0.25rem 1rem;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
height: 3rem;
|
||||
width: 3rem;
|
||||
}
|
||||
@@ -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;
|
||||
@@ -0,0 +1,4 @@
|
||||
.showMore {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import './UsersSidebar.css';
|
||||
import {Stack} from "@mui/material";
|
||||
import SearchBox from "../searchBox/SearchBox";
|
||||
import SuggestedUsers from "../suggestedUsers/SuggestedUsers";
|
||||
|
||||
|
||||
const UsersSidebar = () => {
|
||||
|
||||
const showMoreCallback = () => console.log("clicked show more");
|
||||
return (
|
||||
<Stack direction="column"
|
||||
justifyContent="flex-start"
|
||||
alignItems="center"
|
||||
spacing={2}
|
||||
sx={{minWidth: "max-content"}}>
|
||||
|
||||
<SearchBox/>
|
||||
<SuggestedUsers showMoreCallback={showMoreCallback}/>
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
export default UsersSidebar;
|
||||
@@ -0,0 +1,11 @@
|
||||
.feed {
|
||||
width: 40rem;
|
||||
height: 95vh;
|
||||
overflow: auto;
|
||||
-ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
|
||||
scrollbar-width: none; /* Hide scrollbar for Firefox */
|
||||
}
|
||||
|
||||
.feed::-webkit-scrollbar { /* Hide scrollbar for Chrome, Safari and Opera */
|
||||
display: none;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import './Feed.css';
|
||||
import PostPlaceholder from "../postPlaceholder/PostPlaceholder";
|
||||
import PostsFeed from "../postsFeed/PostsFeed";
|
||||
|
||||
const Feed = () => {
|
||||
return (
|
||||
<div className="feed">
|
||||
<PostPlaceholder/>
|
||||
<PostsFeed/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Feed;
|
||||
@@ -0,0 +1,7 @@
|
||||
.app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.middleSection{
|
||||
width: 40rem;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import './App.css';
|
||||
import Sidebar from "../sidebar/Sidebar";
|
||||
import UsersSidebar from "../UsersSidebar/UsersSidebar";
|
||||
import {Stack} from "@mui/material";
|
||||
import {Outlet} from "react-router-dom";
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<div className="app">
|
||||
|
||||
<Stack className="app"
|
||||
direction="row"
|
||||
justifyContent="space-around">
|
||||
<Sidebar/>
|
||||
<Outlet className="middleSection"/>
|
||||
<UsersSidebar/>
|
||||
</Stack>
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
@@ -0,0 +1,10 @@
|
||||
/*noinspection CssInvalidPropertyValue*/
|
||||
.logo {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 3rem;
|
||||
width: 100%;
|
||||
}
|
||||
.icon {
|
||||
margin: 0 0.5rem;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import './Logo.css';
|
||||
import React from 'react';
|
||||
import {Avatar, Stack} from "@mui/material";
|
||||
import pic from "./../../images/superalgos.png"
|
||||
|
||||
|
||||
const Logo = props => {
|
||||
/* TODO add on click redirect to / */
|
||||
return (
|
||||
<Stack direction="row" className="logo">
|
||||
<Avatar className="icon" alt="SuperAlgos" src={pic}/>
|
||||
<div>SuperAlgos</div>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
export default Logo;
|
||||
@@ -0,0 +1,10 @@
|
||||
import React, {useEffect} from 'react';
|
||||
import {useNavigate} from "react-router-dom";
|
||||
|
||||
const NotFound = () => {
|
||||
let navigate = useNavigate();
|
||||
useEffect(() => navigate("/"), [navigate])
|
||||
return null;
|
||||
};
|
||||
|
||||
export default NotFound;
|
||||
@@ -0,0 +1,49 @@
|
||||
.post {
|
||||
min-width: 5rem; /* todo needs to set a minimum width, but overriding from parent*/
|
||||
max-width: 100%;
|
||||
min-height: 5rem; /* todo needs tbd. needed actually? */
|
||||
max-height: 100%; /* todo need to be 8rem, but is collapsing without scroll. need fix*/
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.postAvatarContainer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
}
|
||||
.postBody {
|
||||
max-width: 100%;
|
||||
min-width: 1.5rem;
|
||||
min-height: 1.5rem;
|
||||
padding-left: 2.8rem;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.postUserName {
|
||||
padding: 0.75rem;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.postFooterContainer {
|
||||
justify-content: flex-start;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
padding-top: 0.50rem;
|
||||
padding-bottom: 0.50rem;
|
||||
}
|
||||
|
||||
.postFooterLikeDislike {
|
||||
justify-content: space-evenly;
|
||||
display: flex;
|
||||
width: 30%;
|
||||
padding-left: 0.50rem;
|
||||
}
|
||||
|
||||
.postFooterRepost {
|
||||
justify-content: flex-end;
|
||||
display: flex;
|
||||
width: 65%;
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
import "./Post.css"
|
||||
import React, {useState} from 'react';
|
||||
import {Avatar, Card, IconButton, Stack, Typography} from "@mui/material";
|
||||
import {Autorenew, ThumbDown, ThumbUp} from "@mui/icons-material";
|
||||
import pic from "./../../images/superalgos.png"
|
||||
|
||||
const Post = () => {
|
||||
|
||||
const userName = "User Name",
|
||||
postBody = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
|
||||
|
||||
const [count, setCount] = useState(0); /* todo define one more for dislike button */
|
||||
|
||||
function onLikeButtonClick() { {/* todo console log print need a fix */}
|
||||
console.log("Liked " + count + " times")
|
||||
}
|
||||
|
||||
function onButtonClick(){ /* todo dislike button function necessary? */
|
||||
console.log("Liked " + count + " times")
|
||||
}
|
||||
|
||||
return (
|
||||
<Card className="post">
|
||||
<Stack direction="row">
|
||||
<Stack className="postAvatarContainer">
|
||||
<Avatar src={pic}/>
|
||||
</Stack>
|
||||
<Stack className="postUserName">
|
||||
{userName}
|
||||
</Stack>
|
||||
</Stack>
|
||||
<Stack className="postBody">
|
||||
{postBody}
|
||||
</Stack>
|
||||
<Stack className="postFooterContainer" direction="row">
|
||||
<Stack className="postFooterLikeDislike" direction="row">
|
||||
<IconButton
|
||||
onClick={() => setCount(count + 1)}
|
||||
>
|
||||
<ThumbUp/>
|
||||
</IconButton><Typography>{count}</Typography>
|
||||
<IconButton
|
||||
onClick={() => {/* TODO remove unnecessary arrow function*/
|
||||
onButtonClick()
|
||||
}}
|
||||
>
|
||||
<ThumbDown/>
|
||||
</IconButton>
|
||||
</Stack>
|
||||
<Stack className="postFooterRepost" direction="row">
|
||||
<IconButton
|
||||
onClick={() => {/* TODO remove unnecessary arrow function*/
|
||||
onButtonClick()
|
||||
}}
|
||||
>
|
||||
<Autorenew/>
|
||||
</IconButton>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
export default Post;
|
||||
@@ -0,0 +1,47 @@
|
||||
.postPlaceholder {
|
||||
width: 39rem;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.postPlaceholderContainer {
|
||||
min-width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.postPlaceholderInputBoxContainer {
|
||||
|
||||
}
|
||||
|
||||
.postPlaceholderAvatar {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
}
|
||||
|
||||
.postPlaceholderTextField {
|
||||
width: 90%;
|
||||
border: 5px;
|
||||
}
|
||||
|
||||
.postPlaceholderInputBox {
|
||||
width: auto;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.postFeedAccountCircle {
|
||||
|
||||
}
|
||||
|
||||
.postPlaceholderButtonStyle {
|
||||
padding: 0.75rem;
|
||||
display: flex;
|
||||
width: auto;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.postPlaceholderButton {
|
||||
height: 1.5rem;
|
||||
width: 5rem;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
import "./PostPlaceholder.css"
|
||||
import React from 'react';
|
||||
import {Avatar, Button, Card, Stack, TextField, Typography} from "@mui/material";
|
||||
import pic from "./../../images/superalgos.png"
|
||||
|
||||
const PostPlaceholder = () => {
|
||||
|
||||
function onButtonClick() {
|
||||
console.log("Clicked Post button");
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="postPlaceholder">
|
||||
<h4>Posts</h4>
|
||||
<div className="postPlaceholderContainer">
|
||||
<Card>
|
||||
<Stack
|
||||
className="postPlaceholderInputBox"
|
||||
direction="row"
|
||||
justifyContent="flex-start"
|
||||
alignItems="center"
|
||||
spacing={1}
|
||||
justify="flex-end">
|
||||
<Stack className="postPlaceholderAvatar">
|
||||
<Avatar src={pic}/>
|
||||
</Stack>
|
||||
<Stack className="postPlaceholderTextField">
|
||||
<Typography gutterBottom variant="subtitle1" component="div">
|
||||
<TextField
|
||||
id="outlined-multiline-flexible"
|
||||
label="what's happening?"
|
||||
fullWidth
|
||||
multiline
|
||||
maxRows={6}
|
||||
/>
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Stack>
|
||||
<Stack className="postPlaceholderButtonStyle" direction="row">
|
||||
<Button
|
||||
onClick={() => { /* TODO remove unnecessary arrow function call*/
|
||||
onButtonClick()
|
||||
}}
|
||||
className="postPlaceholderButton" variant="outlined">
|
||||
Post
|
||||
</Button>
|
||||
</Stack>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default PostPlaceholder;
|
||||
@@ -0,0 +1,5 @@
|
||||
.postFeedContainer {
|
||||
max-width: 39rem;
|
||||
padding: 0.5rem ;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import './PostsFeed.css';
|
||||
import React from 'react';
|
||||
import {Stack} from "@mui/material";
|
||||
import Post from "../post/Post";
|
||||
|
||||
const PostsFeed = () => {
|
||||
const postFeed = [1, 2, 3, 4, 5];
|
||||
|
||||
const posts = postFeed.map(
|
||||
value => {
|
||||
return <Post key={value} id={value} name={`user${value}`}/>
|
||||
}
|
||||
)
|
||||
|
||||
return (
|
||||
<div className="postFeedContainer">
|
||||
<Stack direction="column"
|
||||
spacing={2}>
|
||||
{posts}
|
||||
</Stack>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default PostsFeed;
|
||||
@@ -0,0 +1,3 @@
|
||||
.searchIcon {
|
||||
margin: 1rem 0.5rem;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react';
|
||||
import {Box, TextField} from "@mui/material";
|
||||
import {Search} from "@mui/icons-material";
|
||||
|
||||
const SearchBox = () => {
|
||||
return (
|
||||
<div>
|
||||
<Box sx={{display: 'flex', alignItems: 'flex-end'}}>
|
||||
<Search className="searchIcon"/>
|
||||
<TextField id="users-search" label="Search" variant="standard" type="search"/>
|
||||
</Box>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default SearchBox;
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react';
|
||||
import {Link} from "@mui/material";
|
||||
|
||||
const ShowMoreUsers = ({showMoreCallback}) => {
|
||||
return (
|
||||
<Link
|
||||
component="button"
|
||||
variant="body2"
|
||||
onClick={showMoreCallback}>
|
||||
Show more
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
export default ShowMoreUsers;
|
||||
@@ -0,0 +1,3 @@
|
||||
.sidebar{
|
||||
height: 100%;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
import './Sidebar.css';
|
||||
import {Divider, Stack} from "@mui/material";
|
||||
import SidebarItem from "../sidebarItem/SidebarItem";
|
||||
import Logo from "../logo/Logo";
|
||||
import HomeIcon from '@mui/icons-material/Home';
|
||||
import PostAddIcon from '@mui/icons-material/PostAdd';
|
||||
import PersonIcon from '@mui/icons-material/Person';
|
||||
|
||||
const Sidebar = props => {
|
||||
const menuOptions = [{name: "Home", icon: HomeIcon},
|
||||
{name: "Profile", icon: PersonIcon},
|
||||
{name: "Post", icon: PostAddIcon}
|
||||
/*, "Explore", "Notifications", "Messages", "Bookmarks", "Lists", "More"*/]
|
||||
|
||||
const menuItems = menuOptions.map(option => {
|
||||
return <SidebarItem key={option.name} Icon={option.icon} value={option.name}/>
|
||||
})
|
||||
|
||||
return (
|
||||
<div className="sidebar">
|
||||
<Stack direction="column"
|
||||
justifyContent="flex-start"
|
||||
alignItems="center"
|
||||
spacing={5}
|
||||
sx={{minWidth: "max-content"}}>
|
||||
<Logo/>
|
||||
<Stack
|
||||
direction="column"
|
||||
justifyContent="space-between"
|
||||
alignItems="center"
|
||||
spacing={2}
|
||||
divider={<Divider orientation="horizontal" flexItem/>}>
|
||||
{menuItems}
|
||||
</Stack>
|
||||
|
||||
</Stack>
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Sidebar;
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
.sidebarItem {
|
||||
/*TODO add on hover*/
|
||||
/*TODO add breakpoints*/
|
||||
width: 15vw;
|
||||
}
|
||||
|
||||
|
||||
.sidebarText {
|
||||
/*TODO hide when too small*/
|
||||
|
||||
width: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sidebarIcon {
|
||||
width: auto;
|
||||
padding: 0 1rem;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import './SidebarItem.css';
|
||||
import {Stack} from "@mui/material";
|
||||
import {useNavigate} from "react-router-dom";
|
||||
|
||||
|
||||
const SidebarItem = ({value, Icon}) => {
|
||||
let navigate = useNavigate();
|
||||
const handleClick = () => {
|
||||
navigate(`/${value}`)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="sidebarItem" onClick={handleClick}>
|
||||
<Stack direction="row">
|
||||
<Icon className="sidebarIcon"/>
|
||||
<div className="sidebarText"> {value} </div>
|
||||
</Stack>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default SidebarItem;
|
||||
Whitespace-only changes.
@@ -0,0 +1,32 @@
|
||||
import "./SuggestedUsers.css"
|
||||
import React, {useEffect} from 'react';
|
||||
import UserCard from "../User/UserCard";
|
||||
import ShowMoreUsers from "../showMoreUsers/ShowMoreUsers";
|
||||
import {Stack} from "@mui/material";
|
||||
|
||||
|
||||
const SuggestedUsers = ({showMoreCallback}) => {
|
||||
const usersIds = [1, 2, 3, 4, 5];
|
||||
|
||||
|
||||
const users = usersIds.map(value => {
|
||||
let callBack = () => console.log(`Clicked follow on user${value}`);
|
||||
return <UserCard key={value} id={value} name={`user${value}`} followCallback={callBack}/>
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
console.log("SuggestedUsersConstructor called")
|
||||
}, []);
|
||||
|
||||
|
||||
return (
|
||||
<Stack direction="column"
|
||||
justifyContent="flex-start"
|
||||
alignItems="center"
|
||||
spacing={1}>
|
||||
{users}
|
||||
<ShowMoreUsers showMoreCallback={showMoreCallback}/>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
export default SuggestedUsers;
|
||||
@@ -0,0 +1,41 @@
|
||||
.userSection {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.banner {
|
||||
height: 10rem;
|
||||
}
|
||||
|
||||
.profileAvatar {
|
||||
height: 7rem !important;
|
||||
width: 7rem !important;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.profilePicBG {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: none no-repeat scroll 0 0 #fff;
|
||||
position: relative;
|
||||
height: 8rem !important;
|
||||
width: 8rem !important;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.profileCard {
|
||||
margin-top: -50px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 8rem;
|
||||
}
|
||||
|
||||
.profileSection {
|
||||
width: 100%;
|
||||
overflow: initial !important; /* TODO check this is needed */
|
||||
height: 15rem;
|
||||
}
|
||||
|
||||
.middleSection {
|
||||
width: 39rem;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import "./UserProfile.css"
|
||||
import React from 'react';
|
||||
import UserProfileHeader from "../userProfileHeader/UserProfileHeader";
|
||||
import {Stack} from "@mui/material";
|
||||
import PostsFeed from "../postsFeed/PostsFeed";
|
||||
|
||||
|
||||
const UserProfile = () => {
|
||||
|
||||
/*TODO finish this shit*/
|
||||
|
||||
let actualUser = 'Loui Molina';
|
||||
|
||||
return (
|
||||
<Stack direction="column"
|
||||
justifyContent="flex-start"
|
||||
alignItems="center"
|
||||
spacing={1}
|
||||
className="middleSection">
|
||||
|
||||
<UserProfileHeader actualUser={actualUser}/>
|
||||
<PostsFeed/>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
export default UserProfile;
|
||||
Whitespace-only changes.
@@ -0,0 +1,30 @@
|
||||
import React from 'react';
|
||||
import {Card, CardContent, CardMedia, Typography} from "@mui/material";
|
||||
import banner from "../../images/banner.jpg";
|
||||
import pfp from "../../images/superalgos.png";
|
||||
|
||||
const UserProfileHeader = ({actualUser}) => {
|
||||
return (
|
||||
<Card className="profileSection">
|
||||
<CardMedia className="banner"
|
||||
component="img"
|
||||
image={banner}
|
||||
alt="PP"
|
||||
/>
|
||||
<div className="profileCard">
|
||||
<div className="profilePicBG">
|
||||
<CardMedia className="profileAvatar"
|
||||
component="img"
|
||||
image={pfp}
|
||||
alt="ProfilePic"
|
||||
/>
|
||||
</div>
|
||||
<CardContent className="userSection">
|
||||
<Typography variant="h5">{actualUser}</Typography>
|
||||
</CardContent>
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
export default UserProfileHeader;
|
||||
Reference in new issue
Block a user