From 39ddc8392917bc0c4f6a40f51a06d8f25424098b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20R=C3=B6hrich?= Date: Thu, 26 Oct 2023 13:40:51 +0200 Subject: [PATCH] object store: fix model functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix model function `get` --> `put` - Fix divider in action menu not having a key and thus throwing a warning Signed-off-by: Moritz Röhrich --- src/components/DropOption/DropOption.js | 2 +- src/models/objectStore.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/DropOption/DropOption.js b/src/components/DropOption/DropOption.js index 23467e963..577f6969d 100755 --- a/src/components/DropOption/DropOption.js +++ b/src/components/DropOption/DropOption.js @@ -5,7 +5,7 @@ import { Dropdown, Button, Icon, Menu, Tooltip } from 'antd' const DropOption = ({ onMenuClick, menuOptions = [], buttonStyle, dropdownProps, tooltipProps }) => { const menu = menuOptions.map(item => { if (item.type === 'divider') { - return () + return () } const tooltip = item.tooltip !== undefined ? item.tooltip : '' return ( diff --git a/src/models/objectStore.js b/src/models/objectStore.js index 369cd94c7..a582a78ca 100644 --- a/src/models/objectStore.js +++ b/src/models/objectStore.js @@ -29,9 +29,9 @@ export default { const data = yield call(listObjectStores, payload) yield put({ type: 'listObjectStores', payload: { ...data } }) }, - *get({ payload }, { call, get }) { + *get({ payload }, { call, put }) { const data = yield call(getObjectStore, payload) - yield get({ type: 'getObjectStore', payload: { ...data } }) + yield put({ type: 'getObjectStore', payload: { ...data } }) }, *create({ payload, callback }, { call, put }) { yield call(createObjectStore, payload)