1
0

tasks-menu.js 907 B

12345678910111213141516171819202122232425
  1. import { View } from 'app/design/view';
  2. import { BlockWrapper } from 'app/components/block-wrapper';
  3. import ElementMenu from 'app/components/elements/menu';
  4. export default function ElementTasksMenu({ data, blockWrapperProps, url }) {
  5. const menus = Object.entries(data || {});
  6. if (!menus.length) return null;
  7. return (
  8. <BlockWrapper {...blockWrapperProps}>
  9. <View className="w-full gap-4">
  10. {menus.map(([key, menu]) => (
  11. <View key={menu.object || key} className="flex-shrink-0">
  12. <ElementMenu
  13. data={{ content: { items: menu.items || [] } }}
  14. url={url}
  15. blockWrapperProps={{ block: { designbox_id: null } }}
  16. />
  17. </View>
  18. ))}
  19. </View>
  20. </BlockWrapper>
  21. );
  22. }