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

545 remove date from comments page #547

Merged
merged 2 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ export const Comment = styled(Body)`
export const Author = styled(Body)`
font-weight: bold;
`;
export const Date = styled(Body)`
export const Time = styled(Body)`
font-weight: bold;
display: none;
@media (min-width: 600px) {
display: flex;
}
`;

export const Likes = styled(Body)``;
export const Likes = styled(Body)`
font-weight: bold;
`;
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Author, Card, Comment, Date, Likes } from './CommentsColumns.styled';
import { Author, Card, Comment, Time, Likes } from './CommentsColumns.styled';

function CycleColumns() {
return (
<Card $columns={4}>
<Comment>Comment</Comment>
<Author>Author</Author>
<Date>Date</Date>
<Time>Time</Time>
<Likes>Likes</Likes>
</Card>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
const [isCommentLiked, setIsCommentLiked] = useState(false);

const options: Intl.DateTimeFormatOptions = {
weekday: 'long',
day: 'numeric',
month: 'long',
hour: 'numeric',
minute: 'numeric',
};
Expand All @@ -56,7 +53,7 @@
const currentUserLiked = commentLikes.some((like) => like.userId === user?.id);
setIsCommentLiked(currentUserLiked);
}
}, [commentLikes]);

Check warning on line 56 in packages/berlin/src/components/tables/comment-table/CommentsTable.tsx

View workflow job for this annotation

GitHub Actions / Check linting

React Hook useEffect has a missing dependency: 'user?.id'. Either include it or remove the dependency array

const { mutate: postLikeMutation } = useMutation({
mutationFn: postLike,
Expand Down
Loading