Skip to content

Commit

Permalink
fix(mentions): Adapt toaster to type
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Oct 23, 2024
1 parent 35095f8 commit 92fed9d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/src/webSocketServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ webSocketServer.on('connection', (webSocket) => {
toast = {
description: `${Math.min(data.length, (i + 1) * perChunk)} / ${
data.length
} issue(s) submitted`,
} issue${data.length > 1 ? 's' : ''} submitted`,
id: `processCorrections${i}`,
title: `${type.replace('-', ' ')} corrections are being processed`,
};
Expand All @@ -42,10 +42,10 @@ webSocketServer.on('connection', (webSocket) => {
webSocket.send(JSON.stringify(toast));
} else {
toast = {
description: `${data.length} corrections to ${type.replace('-', '')} have been saved -
see <a href="https://github.com/dataesr/${type}/issues" target="_blank">https://github.com/dataesr/openalex-affiliations/issues</a>`,
description: `${data.length} correction${data.length > 1 ? 's' : ''} to ${type.replace('-', ' ')} have been saved -
see <a href="https://github.com/dataesr/${type}/issues" target="_blank">https://github.com/dataesr/${type}/issues</a>`,
id: 'successCorrections',
title: 'OpenAlex corrections sent',
title: `${type.replace('-', ' ')} correction${data.length > 1 ? 's' : ''} sent`,
toastType: 'success',
};
webSocket.send(JSON.stringify(toast));
Expand Down

0 comments on commit 92fed9d

Please sign in to comment.