|
|
@ -10,27 +10,27 @@ export const Comments = ({ comments }) => { |
|
|
|
// connectToParent(comments);
|
|
|
|
// connectToParent(comments);
|
|
|
|
const Comment = ({ comment }) => { |
|
|
|
const Comment = ({ comment }) => { |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div className="w-full flex flex-col"> |
|
|
|
<div className="w-full flex flex-col bg-surface border border-surfaceBorder px-4 py-2"> |
|
|
|
<header className="w-full flex flex-row justify-between py-1"> |
|
|
|
<header className="w-full flex flex-row justify-between py-1"> |
|
|
|
<div className="flex flex-row items-end"> |
|
|
|
<div className="flex flex-row items-end"> |
|
|
|
<Avatar source={comment.userImage} size={60} rounded={true} /> |
|
|
|
<Avatar source={comment.userImage} size={60} rounded={true} /> |
|
|
|
<div className="flex flex-col"> |
|
|
|
<div className="flex flex-col"> |
|
|
|
<strong className="mr-2 text-lg">{comment.username}</strong> |
|
|
|
<strong className="mr-2 text-lg">{comment.username}</strong> |
|
|
|
<div className="flex flex-row items-center divide-x divide-gray-300 divided ltr"> |
|
|
|
<div className="flex flex-row items-center divide-x divide-surfaceBorder divided ltr"> |
|
|
|
<span className="px-2 text-xs text-gray-500"> |
|
|
|
<span className="px-2 text-xs text-primaryText"> |
|
|
|
{comment.product?.color} |
|
|
|
{comment.product?.color} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<span className="px-2 text-xs text-gray-500"> |
|
|
|
<span className="px-2 text-xs text-primaryText"> |
|
|
|
{comment.product?.name} |
|
|
|
{comment.product?.name} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="flex flex-row items-center divide-x divide-gray-300 divided ltr"> |
|
|
|
<div className="flex flex-row items-center divide-x divide-gray-300 divided ltr"> |
|
|
|
<span className="px-2 text-sm text-blue-400"> |
|
|
|
<span className="px-2 text-sm text-primaryLight"> |
|
|
|
{moment(comment.data).locale("fa").format("YYYY/MM/DD")} |
|
|
|
{moment(comment.data).locale("fa").format("YYYY/MM/DD")} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<span className="px-2 text-sm text-blue-400"> |
|
|
|
<span className="px-2 text-sm text-primaryLight"> |
|
|
|
{comment.date.getHours()} : {comment.date.getMinutes()} |
|
|
|
{comment.date.getHours()} : {comment.date.getMinutes()} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -67,9 +67,9 @@ export const Comments = ({ comments }) => { |
|
|
|
)} |
|
|
|
)} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</header> |
|
|
|
</header> |
|
|
|
<p className="text-gray-500 mt-2">{comment.text}</p> |
|
|
|
<p className="text-primaryText mt-2">{comment.text}</p> |
|
|
|
<div className="self-end mt-4"> |
|
|
|
<div className="self-end mt-4"> |
|
|
|
<Button className="bg-gray-400 text-sm text-white rounded p-2" /> |
|
|
|
<Button className="bg-primary text-sm text-white rounded p-2" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|