Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

552 B
Raw Blame
import { createViewConvert } from '../core/view/convert.js';
import { kanbanViewModel } from './kanban/index.js';
import { tableViewModel } from './table/index.js';

export const viewConverts = [
  createViewConvert(tableViewModel, kanbanViewModel, data => {
    if (data.groupBy) {
      return {
        filter: data.filter,
        groupBy: data.groupBy,
      };
    }
    return {
      filter: data.filter,
    };
  }),
  createViewConvert(kanbanViewModel, tableViewModel, data => ({
    filter: data.filter,
    groupBy: data.groupBy,
  })),
];