Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/fe/649/detailed search #857

Merged
merged 10 commits into from
Dec 25, 2023
7 changes: 6 additions & 1 deletion ludos/annotation/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# LUDOS Annotation Api
# LUDOS Annotation Server

## How to run?
```WORKDIR=./ludos/annotation```<br/>
1. Run ```docker compose up --build``` <br/>
2. Now, the api is available with localhost:8090 base url.
2 changes: 1 addition & 1 deletion ludos/backend/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# LUDOS Backend Api
Deployed Swagger Documentation: http://3.125.225.39:8080/api
Deployed Swagger Documentation: http://164.92.195.35:8080/api
## How to run?
```WORKDIR=./ludos/backend```<br/>
1. Create a .env file for the environment variables. Please ask for the variables. The name of the variables are included in .env.example file. <br/>
Expand Down
36 changes: 17 additions & 19 deletions ludos/frontend/src/components/ForumTopic.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,28 +171,26 @@ function ForumTopic(data) {
))}
</Grid>
</Grid>

<Typography
variant="body2"
component="div"
style={{
color: "white",
marginTop: "3px",
marginRight: "10px",
display: "flex",
marginLeft: "10px",
textAlign: "center",
lineHeight: "1.7",
}}
<Link
to={`/thread/${data.topic.id}`}
style={{ textDecoration: "none", color: "inherit" }}
>
<Link
to={`/thread/${data.topic.id}`}
style={{ textDecoration: "none", color: "inherit" }}
<Typography
variant="body2"
component="div"
style={{
color: "white",
marginTop: "3px",
marginRight: "10px",
display: "flex",
marginLeft: "10px",
textAlign: "center",
lineHeight: "1.7",
}}
>
{data.topic.title}
</Link>
</Typography>

</Typography>
</Link>
<Grid
style={{
display: "flex",
Expand Down
54 changes: 27 additions & 27 deletions ludos/frontend/src/components/ForumTopicForGame.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import LaunchIcon from "@mui/icons-material/Launch";
//isUpcomingTitle, launching date and demo link is needed
function ForumTopic(data) {
console.log(data.topic);
const directLink = `/profile-page/${data.topic.user.id}`;
const directLink = `/profile-page/${data.topic.user?.id}`;
const tagBox = {
display: "flex",
justifyContent: "center",
Expand Down Expand Up @@ -82,7 +82,7 @@ function ForumTopic(data) {
marginRight: "5px",
};
*/
useEffect(() => {}, []);
useEffect(() => { }, []);

return (
<Grid
Expand Down Expand Up @@ -123,7 +123,7 @@ function ForumTopic(data) {
paddingBottom: "10px",
}}
src={
data.topic.user.avatar ||
data.topic.user?.avatar ||
"https://p7.hiclipart.com/preview/173/464/909/clip-art-pokeball-png.jpg"
}
/>
Expand All @@ -138,7 +138,7 @@ function ForumTopic(data) {
>
@
<Link to={directLink} style={userStyle}>
{data.topic.user.username}
{data.topic.user?.username}
</Link>
</Typography>
</Grid>
Expand Down Expand Up @@ -175,7 +175,7 @@ function ForumTopic(data) {
}}
>
<Typography variant="caption" component="div" style={forumStyle}>
{data.topic.game.title}
{data.topic.game?.title}
</Typography>
{data.topic.upcomingTitle != null &&
data.topic.upcomingTitle.isUpcomingTitle && (
Expand All @@ -190,7 +190,7 @@ function ForumTopic(data) {
</Grid>
<Grid style={{ display: "flex", justifyContent: "space-between" }}>
{data.topic &&
data.topic.tags.map((tag1, index1) => (
data.topic.tags?.map((tag1, index1) => (
<Typography
variant="caption"
component="div"
Expand All @@ -202,24 +202,24 @@ function ForumTopic(data) {
))}
</Grid>
</Grid>
<Typography
variant="body2"
component="div"
style={{
color: "white",
marginTop: "3px",
marginRight: "10px",
display: "flex",
marginLeft: "10px",
textAlign: "center",
lineHeight: "1.7",
fontSize: "20px",
}}
>
<Link to={`/thread/${data.topic.id}`} style={userStyle}>
<Link to={`/thread/${data.topic.id}`} style={userStyle}>
<Typography
variant="body2"
component="div"
style={{
color: "white",
marginTop: "3px",
marginRight: "10px",
display: "flex",
marginLeft: "10px",
textAlign: "center",
lineHeight: "1.7",
fontSize: "20px",
}}
>
{data.topic.title}
</Link>
</Typography>
</Typography>
</Link>
<Grid
style={{
display: "flex",
Expand Down Expand Up @@ -248,7 +248,7 @@ function ForumTopic(data) {
flexDirection: "row",
justifyContent:
data.topic.upcomingTitle != null &&
data.topic.upcomingTitle.isUpcomingTitle
data.topic.upcomingTitle.isUpcomingTitle
? "space-between"
: "flex-end",
}}
Expand Down Expand Up @@ -322,7 +322,7 @@ function ForumTopic(data) {
marginRight: "3px",
}}
>
@{data.topic.user.username}
@{data.topic.user?.username}
</Typography>
<AccessTimeIcon />
<Typography
Expand All @@ -337,8 +337,8 @@ function ForumTopic(data) {
marginBottom: "10px",
}}
>
{data.topic.createdAt.split("T")[0]}{" "}
{data.topic.createdAt.split("T")[1].split(".")[0]}
{data.topic.createdAt?.split("T")[0]}{" "}
{data.topic.createdAt?.split("T")[1].split(".")[0]}
</Typography>
<MapsUgcIcon />
<Typography
Expand Down
Loading
Loading