Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
object store: fix model functions
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
  • Loading branch information
m-ildefons committed Oct 26, 2023
1 parent 0e7d1bf commit 39ddc83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/DropOption/DropOption.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (<Menu.Divider />)
return (<Menu.Divider key={Math.random()} />)
}
const tooltip = item.tooltip !== undefined ? item.tooltip : ''
return (
Expand Down
4 changes: 2 additions & 2 deletions src/models/objectStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 39ddc83

Please sign in to comment.