Show new cell name in new cell notification

pull/10616/head
Alex P 2018-04-19 10:22:50 -07:00
parent 0695904075
commit 334e8dfa27
2 changed files with 6 additions and 6 deletions

View File

@ -299,7 +299,7 @@ export const addDashboardCellAsync = (
getNewDashboardCell(dashboard, cellType)
)
dispatch(addDashboardCell(dashboard, data))
dispatch(notify(notifyCellAdded()))
dispatch(notify(notifyCellAdded(data.name)))
} catch (error) {
console.error(error)
dispatch(errorThrown(error))

View File

@ -412,24 +412,24 @@ export const notifyDashboardDeleted = name => ({
export const notifyDashboardDeleteFailed = (name, errorMessage) =>
`Failed to delete Dashboard ${name}: ${errorMessage}.`
export const notifyCellAdded = () => ({
export const notifyCellAdded = name => ({
...defaultSuccessNotification,
icon: 'dash-h',
duration: 2200,
message: 'Added "Untitled Cell" to dashboard.',
duration: 1900,
message: `Added "${name}" to dashboard.`,
})
export const notifyCellCloned = name => ({
...defaultSuccessNotification,
icon: 'duplicate',
duration: 2200,
duration: 1900,
message: `Added "${name}" to dashboard.`,
})
export const notifyCellDeleted = name => ({
...defaultDeletionNotification,
icon: 'dash-h',
duration: 2200,
duration: 1900,
message: `Deleted "${name}" from dashboard.`,
})