mobile responsive

This commit is contained in:
gosangam
2026-10-16 15:45:29 +05:30
parent 1e551764e1
commit b194d4aa03
21 changed files with 249 additions and 138 deletions
+15 -10
View File
@@ -9,6 +9,7 @@ import { Table, THead, TR, TH, TD } from "@/components/ui/table";
import { Button } from "@/components/ui/button";
import { useConfirm } from "@/components/confirm";
import { fmtDate } from "@/lib/utils";
import { Clamp } from "@/components/ui/clamp";
export default function PostsPage() {
const [q, setQ] = useState("");
@@ -67,25 +68,29 @@ export default function PostsPage() {
list.items.map((p) => (
<TR key={p.id} className={p.deleted_at ? "opacity-60" : ""}>
<TD className="max-w-md">
<div className="line-clamp-2">{p.caption || "—"}</div>
<div className="mt-0.5 flex flex-wrap items-center gap-2 text-xs text-muted-foreground">
{p.source_title}
<Clamp lines={2}>{p.caption || "—"}</Clamp>
<div className="mt-0.5 flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground">
{p.source_title ? (
<Clamp lines={2} className="max-w-full">
{p.source_title}
</Clamp>
) : null}
{p.deleted_at ? (
<span className="rounded bg-destructive/10 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-destructive">
<span className="rounded bg-destructive/10 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-destructive whitespace-nowrap">
Deleted
</span>
) : p.is_hidden ? (
<span className="rounded bg-muted px-1.5 py-0.5 text-[10px] uppercase tracking-wide">
<span className="rounded bg-muted px-1.5 py-0.5 text-[10px] uppercase tracking-wide whitespace-nowrap">
Hidden
</span>
) : null}
</div>
</TD>
<TD className="whitespace-nowrap">
<div className="font-medium">{p.author_name}</div>
<div className="text-xs text-muted-foreground">
@{p.author_handle}
</div>
<TD className="max-w-[14rem]">
<Clamp className="font-medium">{p.author_name}</Clamp>
<Clamp className="text-xs text-muted-foreground">
{`@${p.author_handle}`}
</Clamp>
</TD>
<TD className="whitespace-nowrap text-xs text-muted-foreground">
{p.likes_count} likes · {p.comments_count} comments