this repo has no description
5
fork

Configure Feed

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

fix: boards

Turtlepaw 3d3de3fc 7eb33d64

+18 -5
+17 -4
src/components/BoardPicker.tsx
··· 20 20 } from "@/components/ui/popover"; 21 21 import { Board } from "@/lib/stores/boards"; 22 22 import clsx from "clsx"; 23 + import { useAuth } from "@/lib/hooks/useAuth"; 23 24 24 25 export function BoardsPicker({ 25 26 boards, ··· 29 30 }: { 30 31 selected: string; 31 32 onSelected: (value: string) => unknown; 32 - boards: Map<string, Board>; 33 + boards: Record< 34 + string, 35 + Record< 36 + string, 37 + { 38 + name: string; 39 + description: string; 40 + } 41 + > 42 + >; 33 43 onCreateBoard: (name: string) => void; // New prop 34 44 }) { 35 45 const [open, setOpen] = React.useState(false); 36 46 const [search, setSearch] = React.useState(""); 47 + const { agent } = useAuth(); 37 48 38 - const entries = Array.from(boards.entries()).filter(([_, board]) => 39 - board.name.toLowerCase().includes(search.toLowerCase()) 49 + if (!agent) return <div>Not logged in :(</div>; 50 + 51 + const entries = Array.from(Object.entries(boards[agent?.assertDid])).filter( 52 + ([_, board]) => board.name.toLowerCase().includes(search.toLowerCase()) 40 53 ); 41 54 42 - const selectedBoard = boards.get(value); 55 + const selectedBoard = boards[agent?.assertDid]?.[value]; 43 56 44 57 return ( 45 58 <Popover open={open} onOpenChange={setOpen}>
+1 -1
src/components/SaveButton.tsx
··· 69 69 toast("Board created"); 70 70 71 71 const rkey = new AtUri(result.data.uri).rkey; 72 - boardsStore.setBoard(rkey, record); 72 + boardsStore.setBoard(agent.assertDid, rkey, record); 73 73 setSelectedBoard(rkey); 74 74 } else { 75 75 toast("Failed to create board");