Skip to content

Commit

Permalink
Add default color to comment avatars
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielrindlaub committed Sep 11, 2024
1 parent 30ecfb2 commit b52055d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/features/loupe/Comment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { useSelector, useDispatch } from 'react-redux';
import { selectUserUsername } from '../auth/authSlice.js';
import { DateTime } from 'luxon';
import { editComment } from '../review/reviewSlice.js';
import { indigo } from '@radix-ui/colors';

const StyledFieldRow = styled(FieldRow, {
display: 'block',
Expand All @@ -31,7 +32,8 @@ const StyledAvatar = styled('div', {
borderRadius: '$round',
height: '$5',
width: '$5',
backgroundColor: '$backgroundExtraDark',
backgroundColor: indigo.indigo4,
color: indigo.indigo11,
fontWeight: 'bold',
display: 'grid',
placeItems: 'center',
Expand Down Expand Up @@ -145,11 +147,7 @@ const timeAgoPrettyPrint = (isoDateTimeString) => {
return 'a few seconds ago';
};

export const Comment = ({
comment,
imageId,
onChangeOpen
}) => {
export const Comment = ({ comment, imageId, onChangeOpen }) => {
const dispatch = useDispatch();
const authorInitial = comment.author[0].toUpperCase();
const currentUser = useSelector(selectUserUsername);
Expand Down

0 comments on commit b52055d

Please sign in to comment.