types#Board TypeScript Examples

The following examples show how to use types#Board. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BoardList.test.tsx    From knboard with MIT License 5 votes vote down vote up
boards: Board[] = [{ id: 1, name: "Internals", owner: 1, members: [] }]
Example #2
Source File: BoardSlice.tsx    From knboard with MIT License 5 votes vote down vote up
patchBoard = createAsyncThunk<
  Board,
  { id: Id; fields: Partial<PatchFields> }
>("board/patchBoardStatus", async ({ id, fields }) => {
  const response = await api.patch(`${API_BOARDS}${id}/`, fields);
  return response.data;
})
Example #3
Source File: BoardSlice.tsx    From knboard with MIT License 5 votes vote down vote up
fetchAllBoards = createAsyncThunk<Board[]>(
  "board/fetchAllStatus",
  async () => {
    const response = await api.get(API_BOARDS);
    return response.data;
  }
)
Example #4
Source File: BoardSlice.tsx    From knboard with MIT License 5 votes vote down vote up
createBoard = createAsyncThunk<Board, string>(
  "board/createBoardStatus",
  async (name) => {
    const response = await api.post(API_BOARDS, { name });
    return response.data;
  }
)