feedback formatter
This commit is contained in:
@@ -28,6 +28,7 @@ import {
|
||||
type AppNotification,
|
||||
type UserSummary,
|
||||
} from "@/lib/social";
|
||||
import { RichText } from "@/lib/rich-text";
|
||||
import { UserAvatar } from "@/components/ui/user-avatar";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { timeAgo } from "@/lib/time";
|
||||
@@ -275,10 +276,16 @@ function NotificationRow({
|
||||
<UserAvatar src={isAdmin ? null : n.actor_avatar_url} name={display} />
|
||||
<div className="min-w-0 flex-1">
|
||||
{isAdmin ? (
|
||||
<p className="text-sm text-foreground leading-snug whitespace-pre-line">
|
||||
// A div, not a <p>: the formatted body nests elements, and RichText
|
||||
// handles line breaks itself (so no whitespace-pre-line either).
|
||||
<div className="text-sm text-foreground leading-snug">
|
||||
<span className="font-semibold">{display}</span>
|
||||
{n.body ? <span className="block mt-0.5">{n.body}</span> : null}
|
||||
</p>
|
||||
{n.body ? (
|
||||
<span className="block mt-0.5">
|
||||
<RichText text={n.body} />
|
||||
</span>
|
||||
) : null}
|
||||
</div>
|
||||
) : (
|
||||
<p className="text-sm text-foreground leading-snug">
|
||||
<span className="font-semibold">{display}</span> {message}
|
||||
|
||||
Reference in New Issue
Block a user