Fix ReviewDB
This commit is contained in:
parent
cd5e0aeec1
commit
a29115ba78
|
@ -30,11 +30,11 @@ import { openBlockModal } from "./BlockedUserModal";
|
||||||
import { BlockButton, DeleteButton, ReportButton } from "./MessageButton";
|
import { BlockButton, DeleteButton, ReportButton } from "./MessageButton";
|
||||||
import ReviewBadge from "./ReviewBadge";
|
import ReviewBadge from "./ReviewBadge";
|
||||||
|
|
||||||
const { cozyMessage, message, groupStart, buttons, buttonsInner } = findByProps("cozyMessage");
|
const messageClasses = findByProps("cozyMessage");
|
||||||
const { container, isHeader } = findByProps("container", "isHeader");
|
const containerClasses = findByProps("container", "isHeader");
|
||||||
const { wrapper, cozy, avatar, clickable, username } = findByProps("avatar", "zalgo");
|
const avatarClasses = findByProps("avatar", "zalgo");
|
||||||
const buttonClasses = findByProps("button", "wrapper", "selected");
|
const buttonClasses = findByProps("button", "wrapper", "selected");
|
||||||
const botTag = findByProps("botTag", "botTagRegular");
|
const botTagClasses = findByProps("botTag", "botTagRegular");
|
||||||
|
|
||||||
const dateFormat = new Intl.DateTimeFormat();
|
const dateFormat = new Intl.DateTimeFormat();
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ export default function ReviewComponent({ review, refetch, profileId }: { review
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes(cl("review"), cozyMessage, wrapper, message, groupStart, cozy)} style={
|
<div className={classes(cl("review"), messageClasses.cozyMessage, avatarClasses.wrapper, messageClasses.message, messageClasses.groupStart, avatarClasses.cozy)} style={
|
||||||
{
|
{
|
||||||
marginLeft: "0px",
|
marginLeft: "0px",
|
||||||
paddingLeft: "52px", // wth is this
|
paddingLeft: "52px", // wth is this
|
||||||
|
@ -114,14 +114,14 @@ export default function ReviewComponent({ review, refetch, profileId }: { review
|
||||||
}>
|
}>
|
||||||
|
|
||||||
<img
|
<img
|
||||||
className={classes(avatar, clickable)}
|
className={classes(avatarClasses.avatar, avatarClasses.clickable)}
|
||||||
onClick={openModal}
|
onClick={openModal}
|
||||||
src={review.sender.profilePhoto || "/assets/1f0bfc0865d324c2587920a7d80c609b.png?size=128"}
|
src={review.sender.profilePhoto || "/assets/1f0bfc0865d324c2587920a7d80c609b.png?size=128"}
|
||||||
style={{ left: "0px", zIndex: 0 }}
|
style={{ left: "0px", zIndex: 0 }}
|
||||||
/>
|
/>
|
||||||
<div style={{ display: "inline-flex", justifyContent: "center", alignItems: "center" }}>
|
<div style={{ display: "inline-flex", justifyContent: "center", alignItems: "center" }}>
|
||||||
<span
|
<span
|
||||||
className={classes(clickable, username)}
|
className={classes(avatarClasses.clickable, avatarClasses.username)}
|
||||||
style={{ color: "var(--channels-default)", fontSize: "14px" }}
|
style={{ color: "var(--channels-default)", fontSize: "14px" }}
|
||||||
onClick={() => openModal()}
|
onClick={() => openModal()}
|
||||||
>
|
>
|
||||||
|
@ -130,9 +130,9 @@ export default function ReviewComponent({ review, refetch, profileId }: { review
|
||||||
|
|
||||||
{review.type === ReviewType.System && (
|
{review.type === ReviewType.System && (
|
||||||
<span
|
<span
|
||||||
className={classes(botTag.botTagVerified, botTag.botTagRegular, botTag.botTag, botTag.px, botTag.rem)}
|
className={classes(botTagClasses.botTagVerified, botTagClasses.botTagRegular, botTagClasses.botTag, botTagClasses.px, botTagClasses.rem)}
|
||||||
style={{ marginLeft: "4px" }}>
|
style={{ marginLeft: "4px" }}>
|
||||||
<span className={botTag.botText}>
|
<span className={botTagClasses.botText}>
|
||||||
System
|
System
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
@ -163,10 +163,10 @@ export default function ReviewComponent({ review, refetch, profileId }: { review
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{review.id !== 0 && (
|
{review.id !== 0 && (
|
||||||
<div className={classes(container, isHeader, buttons)} style={{
|
<div className={classes(containerClasses.container, containerClasses.isHeader, messageClasses.buttons)} style={{
|
||||||
padding: "0px",
|
padding: "0px",
|
||||||
}}>
|
}}>
|
||||||
<div className={classes(buttonClasses.wrapper, buttonsInner)} >
|
<div className={classes(buttonClasses.wrapper, messageClasses.buttonsInner)} >
|
||||||
{canReportReview(review) && <ReportButton onClick={reportRev} />}
|
{canReportReview(review) && <ReportButton onClick={reportRev} />}
|
||||||
{canBlockReviewAuthor(profileId, review) && <BlockButton isBlocked={isAuthorBlocked} onClick={blockReviewSender} />}
|
{canBlockReviewAuthor(profileId, review) && <BlockButton isBlocked={isAuthorBlocked} onClick={blockReviewSender} />}
|
||||||
{canDeleteReview(profileId, review) && <DeleteButton onClick={delReview} />}
|
{canDeleteReview(profileId, review) && <DeleteButton onClick={delReview} />}
|
||||||
|
|
Loading…
Reference in a new issue