Skip to content

Commit

Permalink
Merge branch 'summary_card' of https://github.com/lelemm/actual into …
Browse files Browse the repository at this point in the history
…summary_card
  • Loading branch information
lelemm committed Nov 12, 2024
2 parents 5adfeb6 + 68bca8c commit 9f2d062
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions packages/desktop-client/src/components/reports/reports/Summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,13 @@ function SummaryInner({ widget }: SummaryInnerProps) {

const onSaveWidgetName = async (newName: string) => {
if (!widget) {
throw new Error('No widget that could be saved.');
dispatch(
addNotification({
type: 'error',
message: t('Cannot save: No widget available.'),
}),
);
return;
}

const name = newName || t('Summary');
Expand All @@ -191,7 +197,13 @@ function SummaryInner({ widget }: SummaryInnerProps) {

async function onSaveWidget() {
if (!widget) {
throw new Error('No widget that could be saved.');
dispatch(
addNotification({
type: 'error',
message: t('Cannot save: No widget available.'),
}),
);
return;
}

await send('dashboard-update-widget', {
Expand Down

0 comments on commit 9f2d062

Please sign in to comment.