style(frontend): organize imports alphabetically and improve code formatting
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { MessageRecord } from "../../../shared/api/client";
|
||||
import { parseMetadata } from "../../../entities/message/types";
|
||||
import type { MessageRecord } from "../../../shared/api/client";
|
||||
import { EmptyStateMascot } from "../../../widgets/mascot/ChibiMascot";
|
||||
|
||||
interface ImageItem {
|
||||
@@ -68,9 +68,7 @@ export function ImageGrid({ messages }: { messages: MessageRecord[] }) {
|
||||
}
|
||||
|
||||
if (images.length === 0) {
|
||||
return (
|
||||
<EmptyStateMascot variant="thinking" message="No images yet~" />
|
||||
);
|
||||
return <EmptyStateMascot variant="thinking" message="No images yet~" />;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -10,9 +10,9 @@ import {
|
||||
Trash2,
|
||||
} from "lucide-react";
|
||||
import { Fragment, useMemo, useState } from "react";
|
||||
import { parseMetadata } from "../../../entities/message/types";
|
||||
import type { MessageRecord } from "../../../shared/api/client";
|
||||
import { Badge, Button, Skeleton } from "../../../shared/ui";
|
||||
import { parseMetadata } from "../../../entities/message/types";
|
||||
|
||||
const CUSTOM_EMOJI_REGEX = /<(a)?:([a-zA-Z0-9_]+):(\d+)>/g;
|
||||
|
||||
@@ -134,9 +134,7 @@ export function MessageCard({
|
||||
const confidence =
|
||||
message.ai_confidence ?? message.ai_moderation_score ?? null;
|
||||
const [isReanalyzing, setIsReanalyzing] = useState(false);
|
||||
const [showAnalysis, setShowAnalysis] = useState(
|
||||
aiStatus === "flagged",
|
||||
);
|
||||
const [showAnalysis, setShowAnalysis] = useState(aiStatus === "flagged");
|
||||
|
||||
// Build a human-readable analysis summary from categories + confidence + severity
|
||||
const analysisSummary = useMemo(() => {
|
||||
@@ -178,9 +176,7 @@ export function MessageCard({
|
||||
className={`group rounded-2xl border bg-white shadow-sm transition-all hover:border-primary/30 hover:shadow-md ${
|
||||
compact ? "px-4 py-1.5" : "p-4"
|
||||
} ${
|
||||
message.deleted_at
|
||||
? "border-red-200 opacity-60"
|
||||
: "border-primary/20"
|
||||
message.deleted_at ? "border-red-200 opacity-60" : "border-primary/20"
|
||||
}`}
|
||||
>
|
||||
<div className={`flex ${compact ? "gap-2" : "gap-3"}`}>
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
import { motion } from "framer-motion";
|
||||
import { useEffect, useMemo, useRef } from "react";
|
||||
import type { MessageRecord } from "../../../shared/api/client";
|
||||
import {
|
||||
cardStagger,
|
||||
cardItem,
|
||||
} from "../../../shared/hooks/useFramerStagger";
|
||||
import { cardItem, cardStagger } from "../../../shared/hooks/useFramerStagger";
|
||||
import { ScrollArea } from "../../../shared/ui";
|
||||
import { MessageCard, MessageCardSkeleton } from "./MessageCard";
|
||||
import { EmptyStateMascot } from "../../../widgets/mascot/ChibiMascot";
|
||||
import { MessageCard, MessageCardSkeleton } from "./MessageCard";
|
||||
|
||||
export interface MessageFeedProps {
|
||||
messages: MessageRecord[];
|
||||
|
||||
Reference in New Issue
Block a user