try {
} catch (e) {
console.log('Error while retrieving items', e)
}
let items: WidgetItem[] = []
import {fetchItems} from '../../../src/utils/fetch/items'
const response = await fetchItems(nextCookies, boardId)
if (Array.isArray(response)) {
items = response.map( (json: string) => JSON.parse(json) )
}
!!items.length && items.map(item => )
<p>{item.data.content || item.data.title}</p>
async function createItemOnBoard(data: FormData) {}
let content: string = data.get('content') as string;
await createItem(cookies(), boardId, content)
revalidatePath(`/boards/${boardId}`)
let [, startTransition] = useTransition()
import {deleteItemFromBoard} from "../../app/actions";
<ItemView boardId={boardId} itemJson={JSON.stringify(item)}/>