Skip to content

Commit

Permalink
Updated notification ids
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Dec 1, 2022
1 parent b7f165e commit 6fa1810
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ui/src/app/notifications/component/NotificationItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function NotificationItem ({ type, body, timeout, id, onRemove }) {
}, [timeout, id, onRemove]);

return (
<Alert variant={type} onClose={() => onRemove(id)}>
<Alert variant={type} onClose={() => onRemove(id)} className="notification-item">
{body}
</Alert>
)
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/store/notifications/NotificationSlice.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createAction, createSelector, createSlice } from '@reduxjs/toolkit'
import { reverse } from 'lodash';
import { useSelector } from 'react-redux';
import { uuid } from '../../core/utility/uuid';
import uniqueId from 'lodash/uniqueId';

const initialState = {
notifications: []
Expand All @@ -19,7 +19,7 @@ export const createNotificationAction = createAction('notifications/create', fun
return {
payload: {
body,
id: uuid(),
id: uniqueId('notification_'),
createdAt: new Date().toISOString(),
type,
timeout
Expand Down

0 comments on commit 6fa1810

Please sign in to comment.