Retro Bulletin Board Systems on atproto. Web app and TUI. lazy mirror of alyraffauf/atbbs atbbs.xyz
forums python tui atproto bbs
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

web/News: remove flash on news deletion

+1 -9
+1 -9
web/src/pages/News.tsx
··· 6 6 import { POST } from "../lib/lexicon"; 7 7 import { deleteRecord } from "../lib/writes"; 8 8 import { bbsQuery, newsQuery } from "../lib/queries"; 9 - import { queryClient } from "../lib/queryClient"; 10 9 import { alertOnError } from "../lib/alerts"; 11 - import type { NewsPost } from "../lib/bbs"; 12 10 import NewsCard from "../components/post/NewsCard"; 13 11 14 12 export default function NewsPage() { ··· 38 36 if (!agent || !tid) throw new Error("Not signed in"); 39 37 await deleteRecord(agent, POST, tid); 40 38 }, 41 - onSuccess: () => { 42 - queryClient.setQueryData<NewsPost[]>( 43 - newsQuery(bbs.identity.did).queryKey, 44 - (prev) => (prev ?? []).filter((n) => n.rkey !== tid), 45 - ); 46 - navigate(`/bbs/${handle}`); 47 - }, 39 + onSuccess: () => navigate(`/bbs/${handle}`), 48 40 onError: alertOnError("delete"), 49 41 }); 50 42