{r.title}
{r.author || "Anonymous"}
Offers (have)
{r.have}
Wants (take)
{r.want}
{r.body}
) : null}"use client";
import { FormEvent, Suspense, useEffect, useMemo, useRef, useState } from "react";
import { useSearchParams } from "next/navigation";
import { useAccount } from "@/contexts/AccountContext";
import { addBarterListing, loadBarter, type BarterLane, type BarterListing } from "@/lib/barterState";
const LANES: { id: BarterLane; label: string; hint: string }[] = [
{ id: "goods", label: "Physical / goods", hint: "Hardware, prints, tokens, boxes…" },
{ id: "services", label: "Labor / skills", hint: "Tune-ups, consults, studio time…" },
{ id: "data", label: "Data / media", hint: "Scans, decks, anonymized sets…" },
{ id: "open", label: "Open terms", hint: "Wildcard swaps — spell it out." },
];
function BarterPitContent() {
const sp = useSearchParams();
const laneFilter = sp.get("lane") as BarterLane | null;
const { user, hydrated: accountReady } = useAccount();
const prefilledAuthor = useRef(false);
const [rows, setRows] = useState Syncing order book…
{r.author || "Anonymous"}
Offers (have) {r.have} Wants (take) {r.want} {r.body}{r.title}