mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-06 02:00:46 +00:00
added comments tab to profile
This commit is contained in:
1 parent
5883e266a0
commit
986532c8a3
2 files changed
+13
-2
No files matched your search
@@ -29,7 +29,7 @@ function CommentList(props: Props) {
|
||||
|
||||
let rows: Array<JSX.Element> = [];
|
||||
|
||||
reversedComments.forEach((comment) => {
|
||||
reversedComments.forEach(comment => {
|
||||
const createTime = new Date(comment.created_at);
|
||||
const relativeCreateTime = formatDistance(createTime, now, {
|
||||
addSuffix: true,
|
||||
@@ -62,7 +62,7 @@ function CommentList(props: Props) {
|
||||
<tr key={comment.token}>
|
||||
<td className="px-0">
|
||||
<div className="d-flex gap-3 py-3">
|
||||
<Gravatar size={40} email_hash={comment.user_gravatar_hash} />
|
||||
<Gravatar size={42} email_hash={comment.user_gravatar_hash} />
|
||||
<div>
|
||||
<div className="d-flex gap-2 align-items-center">
|
||||
<Link to={profileLink} className="fw-medium text-white">
|
||||
|
||||
@@ -37,6 +37,7 @@ import { usePrefixedDocumentTitle } from "../../../../../common/UsePrefixedDocum
|
||||
import {
|
||||
faBookmark,
|
||||
faCalendarAlt,
|
||||
faComment,
|
||||
faLayerGroup,
|
||||
faPhotoFilmMusic,
|
||||
} from "@fortawesome/pro-solid-svg-icons";
|
||||
@@ -48,6 +49,7 @@ import Tabs from "components/common/Tabs";
|
||||
import MediaTab from "./tabs/MediaTab";
|
||||
import WeightsTab from "./tabs/WeightsTab";
|
||||
import BookmarksTab from "./tabs/BookmarksTab";
|
||||
import { CommentComponent } from "v2/view/_common/comments/CommentComponent";
|
||||
|
||||
interface Props {
|
||||
sessionWrapper: SessionWrapper;
|
||||
@@ -375,6 +377,15 @@ function NewProfilePage(this: any, props: Props) {
|
||||
icon: faBookmark,
|
||||
padding: true,
|
||||
},
|
||||
{
|
||||
to: `/profile/${username}/comments`,
|
||||
label: "Comments",
|
||||
content: (
|
||||
<CommentComponent entityType="user" entityToken={userData.user_token} />
|
||||
),
|
||||
icon: faComment,
|
||||
padding: true,
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user