-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #336 from bounswe/feature/FE/316/home_page
Home Page & Game Page
- Loading branch information
Showing
12 changed files
with
441 additions
and
882 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
import React, { useEffect } from "react"; | ||
import { Box, Typography, Button, Grid } from "@mui/material"; | ||
import { FaArrowUp, FaArrowDown } from "react-icons/fa"; | ||
|
||
function Post(data, key) { | ||
const boxStyle = { | ||
backgroundColor: "rgba(30, 30, 30, 0.9)", | ||
borderRadius: "10px", | ||
paddingTop: "15px", | ||
}; | ||
const headerStyle = { | ||
color: "white", | ||
fontFamily: "Trebuchet MS, sans-serif", | ||
marginBottom: "10px", | ||
}; | ||
const forumStyle = { color: "rgb(0, 150, 255)" }; | ||
const followButton = { | ||
backgroundColor: "rgb(255, 165, 0)", | ||
color: "rgb(0, 0, 0)", | ||
height: "20px", | ||
textTransform: "none", | ||
}; | ||
const descriptionStyle = { color: "white" }; | ||
const tagBox = { | ||
display: "flex", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
backgroundColor: "rgb(0, 150, 255)", | ||
color: "white", | ||
height: "6px", | ||
borderRadius: "10px", | ||
padding: "5px", | ||
marginRight: "5px", | ||
}; | ||
const upVoteButton = { | ||
backgroundColor: "rgb(124, 252, 0)", | ||
marginRight: "5px", | ||
}; | ||
const downVoteButton = { backgroundColor: "rgb(222, 49, 99)" }; | ||
useEffect(() => {}, []); | ||
|
||
return ( | ||
<Grid item xs={12} sm={12} md={12} lg={12} key={key}> | ||
<Box p={5} style={boxStyle}> | ||
<Grid | ||
item | ||
xs={12} | ||
sm={12} | ||
md={12} | ||
lg={12} | ||
style={{ display: "flex", justifyContent: "space-between" }} | ||
> | ||
<Typography variant="caption" component="div" style={forumStyle}> | ||
{data.post.forum} | ||
</Typography> | ||
<Grid style={{ display: "flex", justifyContent: "space-between" }}> | ||
{data.post && data.post.tags.map((data1, index1) => ( | ||
<Typography | ||
variant="caption" | ||
component="div" | ||
style={tagBox} | ||
key={index1} | ||
> | ||
{data1} | ||
</Typography> | ||
))} | ||
<Button variant="contained" style={followButton}> | ||
Follow | ||
</Button> | ||
</Grid> | ||
</Grid> | ||
|
||
<Typography | ||
variant="h4" | ||
component="div" | ||
textAlign="left" | ||
style={headerStyle} | ||
> | ||
{data.post.header} | ||
</Typography> | ||
<Typography | ||
variant="body2" | ||
color="textSecondary" | ||
textAlign="left" | ||
style={descriptionStyle} | ||
> | ||
{data.post.description} | ||
</Typography> | ||
<Grid | ||
style={{ | ||
display: "flex", | ||
justifyContent: "flex-start", | ||
alignItems: "center", | ||
marginTop: "10px", | ||
}} | ||
> | ||
<Button variant="contained" style={upVoteButton}> | ||
<FaArrowUp style={{ color: "black" }} /> | ||
</Button> | ||
<Button variant="contained" style={downVoteButton}> | ||
<FaArrowDown /> | ||
</Button> | ||
</Grid> | ||
</Box> | ||
</Grid> | ||
); | ||
} | ||
|
||
export default Post; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.