Skip to content

Commit

Permalink
fix: comment text is white in lightmode (#1681)
Browse files Browse the repository at this point in the history
  • Loading branch information
Golbolco authored Aug 2, 2024
1 parent f3f7016 commit fdc6fcb
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions react_main/src/pages/Community/Comment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ import {
Grid,
IconButton,
} from "@mui/material";
import { useTheme } from "@mui/styles";
import { VoteWidget } from "./Forums/Forums";
import { NameWithAvatar } from "../User/User";

export const Comment = (props) => {
const theme = useTheme();
const location = props.location;
const comment = props.comment;
const comments = props.comments;
Expand All @@ -33,7 +35,7 @@ export const Comment = (props) => {
setCommentMarkdown(
<ReactMarkdown renderers={basicRenderers()} source={content} />
);
}, []);
}, [content]);

function onDeleteClick() {
const shouldDelete = window.confirm(
Expand All @@ -57,14 +59,12 @@ export const Comment = (props) => {

if (comment.deleted && user.settings.hideDeleted) content = "*deleted*";

// fullWidth is "disabled" for now - ALWAYS use 100%, it looks better
return (
<Grid container>
<Grid item xs={12} md={props?.fullWidth ? 12 : 6}>
<Card
sx={{
width: "100%",
// ...(props?.fullWidth ? { width: "100%" } : { width: "50%" }),
my: props?.marginY,
}}
className={`${comment.deleted ? "deleted" : ""}`}
Expand Down Expand Up @@ -119,16 +119,17 @@ export const Comment = (props) => {
</div>
</div>
<Divider />
<div
<Box
className="md-content"
style={{
backgroundColor: "transparent",
sx={{
backgroundColor: "transparent !important",
paddingTop: "8px",
paddingBottom: 0,
color: `${theme.palette.text.primary} !important`,
}}
>
{CommentMarkdown}
</div>
</Box>
</div>
</CardContent>
</Card>
Expand Down

0 comments on commit fdc6fcb

Please sign in to comment.