import React from "react"; import moment from "jalali-moment"; import Reply from "./Reply/index"; import "./index.scss"; const maxDesktopSize = 1250; const maxMobileSize = 550; const fontSize = { desktop: { strong: window.innerWidth > maxDesktopSize ? 18 : window.innerWidth / 70, p: window.innerWidth > maxDesktopSize ? 14 : window.innerWidth / 85, span: window.innerWidth > maxDesktopSize ? 12 : window.innerWidth / 95, }, mobile: { strong: window.innerWidth > maxMobileSize ? 18 : window.innerWidth / 20, p: window.innerWidth > maxMobileSize ? 14 : window.innerWidth / 27, span: window.innerWidth > maxMobileSize ? 12 : window.innerWidth / 32, }, }; export default function Comment(props) { const { comment } = props; return ( <> {window.innerWidth < 1000 ? (
{comment.text}
{moment(comment.date).format("YYYY/MM/DD")}{comment.text}
{moment(comment.date).format("YYYY/MM/DD")} {comment.reply ?