@replyke/core 7.0.0-beta.75 → 7.0.0-beta.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/hooks/app-notifications/useAppNotifications.js +7 -17
- package/dist/cjs/hooks/app-notifications/useAppNotifications.js.map +1 -1
- package/dist/cjs/hooks/app-notifications/useAppNotificationsActions.d.ts +3 -0
- package/dist/cjs/hooks/app-notifications/useAppNotificationsActions.js +9 -10
- package/dist/cjs/hooks/app-notifications/useAppNotificationsActions.js.map +1 -1
- package/dist/esm/hooks/app-notifications/useAppNotifications.js +8 -18
- package/dist/esm/hooks/app-notifications/useAppNotifications.js.map +1 -1
- package/dist/esm/hooks/app-notifications/useAppNotificationsActions.d.ts +3 -0
- package/dist/esm/hooks/app-notifications/useAppNotificationsActions.js +10 -11
- package/dist/esm/hooks/app-notifications/useAppNotificationsActions.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ var appNotificationsSlice_1 = require("../../store/slices/appNotificationsSlice"
|
|
|
9
9
|
var useAppNotificationsActions_1 = require("./useAppNotificationsActions");
|
|
10
10
|
var useProject_1 = __importDefault(require("../projects/useProject"));
|
|
11
11
|
var user_1 = require("../user");
|
|
12
|
+
var addNotificationsMessages_1 = __importDefault(require("../../helpers/addNotificationsMessages"));
|
|
12
13
|
/**
|
|
13
14
|
* Redux-powered hook that provides the exact same interface as useAppNotificationsData()
|
|
14
15
|
* This is a drop-in replacement for the Context-based hook
|
|
@@ -26,7 +27,7 @@ function useAppNotifications(_a) {
|
|
|
26
27
|
var hasMore = (0, hooks_1.useReplykeSelector)(appNotificationsSlice_1.selectAppNotificationsHasMore);
|
|
27
28
|
var currentPage = (0, hooks_1.useReplykeSelector)(appNotificationsSlice_1.selectAppNotificationsPage);
|
|
28
29
|
var currentProjectId = (0, hooks_1.useReplykeSelector)(appNotificationsSlice_1.selectCurrentProjectId);
|
|
29
|
-
// Get actions
|
|
30
|
+
// Get actions (templates are applied at display time, not fetch time)
|
|
30
31
|
var _d = (0, useAppNotificationsActions_1.useAppNotificationsActions)(), loadMore = _d.loadMore, markNotificationAsRead = _d.markNotificationAsRead, markAllNotificationsAsRead = _d.markAllNotificationsAsRead, resetAppNotifications = _d.resetAppNotifications, fetchMoreNotifications = _d.fetchMoreNotifications, updateUnreadCount = _d.updateUnreadCount;
|
|
31
32
|
// Update Redux state when props change
|
|
32
33
|
(0, react_1.useEffect)(function () {
|
|
@@ -37,20 +38,6 @@ function useAppNotifications(_a) {
|
|
|
37
38
|
(0, react_1.useEffect)(function () {
|
|
38
39
|
dispatch((0, appNotificationsSlice_1.setLimit)(limit));
|
|
39
40
|
}, [dispatch, limit]);
|
|
40
|
-
// Prevent infinite re-renders by comparing current vs new templates
|
|
41
|
-
var currentTemplates = (0, hooks_1.useReplykeSelector)(appNotificationsSlice_1.selectNotificationTemplates);
|
|
42
|
-
var templatesChanged = (0, react_1.useMemo)(function () {
|
|
43
|
-
// If no templates provided, skip comparison
|
|
44
|
-
if (!notificationTemplates)
|
|
45
|
-
return false;
|
|
46
|
-
// Deep comparison using JSON stringify
|
|
47
|
-
return (JSON.stringify(currentTemplates) !== JSON.stringify(notificationTemplates));
|
|
48
|
-
}, [currentTemplates, notificationTemplates]);
|
|
49
|
-
(0, react_1.useEffect)(function () {
|
|
50
|
-
if (notificationTemplates && templatesChanged) {
|
|
51
|
-
dispatch((0, appNotificationsSlice_1.setNotificationTemplates)(notificationTemplates));
|
|
52
|
-
}
|
|
53
|
-
}, [dispatch, notificationTemplates, templatesChanged]);
|
|
54
41
|
// Fetch unread count on mount and when dependencies change
|
|
55
42
|
(0, react_1.useEffect)(function () {
|
|
56
43
|
if (projectId && user) {
|
|
@@ -69,9 +56,12 @@ function useAppNotifications(_a) {
|
|
|
69
56
|
fetchMoreNotifications(currentPage);
|
|
70
57
|
}
|
|
71
58
|
}, [currentPage, fetchMoreNotifications, projectId, user]);
|
|
59
|
+
// Apply templates at display time (not at fetch time)
|
|
60
|
+
// This ensures templates are always applied fresh from props
|
|
61
|
+
var templatedNotifications = (0, react_1.useMemo)(function () { return (0, addNotificationsMessages_1.default)(appNotifications, notificationTemplates); }, [appNotifications, notificationTemplates]);
|
|
72
62
|
// Return the same interface as the original hook
|
|
73
63
|
return (0, react_1.useMemo)(function () { return ({
|
|
74
|
-
appNotifications:
|
|
64
|
+
appNotifications: templatedNotifications,
|
|
75
65
|
unreadAppNotificationsCount: unreadAppNotificationsCount,
|
|
76
66
|
loading: loading,
|
|
77
67
|
hasMore: hasMore,
|
|
@@ -80,7 +70,7 @@ function useAppNotifications(_a) {
|
|
|
80
70
|
markAllNotificationsAsRead: markAllNotificationsAsRead,
|
|
81
71
|
resetAppNotifications: resetAppNotifications,
|
|
82
72
|
}); }, [
|
|
83
|
-
|
|
73
|
+
templatedNotifications,
|
|
84
74
|
unreadAppNotificationsCount,
|
|
85
75
|
loading,
|
|
86
76
|
hasMore,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAppNotifications.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications/useAppNotifications.ts"],"names":[],"mappings":";;;;;AAAA,+BAA2C;AAC3C,2CAA2E;AAE3E,
|
|
1
|
+
{"version":3,"file":"useAppNotifications.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications/useAppNotifications.ts"],"names":[],"mappings":";;;;;AAAA,+BAA2C;AAC3C,2CAA2E;AAE3E,kFASkD;AAClD,2EAA0E;AAC1E,sEAAgD;AAChD,gCAAkC;AAElC,oGAA8E;AAkB9E;;;GAGG;AACH,SAAS,mBAAmB,CAAC,EAGG;QAHH,qBAGC,EAAE,KAAA,EAF9B,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,qBAAqB,2BAAA;IAErB,IAAM,QAAQ,GAAG,IAAA,0BAAkB,GAAE,CAAC;IAEtC,uBAAuB;IACf,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAC3B,IAAA,I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AC;IAEzC,iEAAiE;IACjE,IAAA,iBAAS,EAAC;QACR,IAAI,SAAS,IAAI,IAAI,EAAE,CAAC;YACtB,qBAAqB,EAAE,CAAC;QAC1B,CAAC;IACH,CAAC,EAAE,CAAC,qBAAqB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;IAE7C,gDAAgD;IAChD,IAAA,iBAAS,EAAC;QACR,IAAI,WAAW,GAAG,CAAC,IAAI,SAAS,IAAI,IAAI,EAAE,CAAC;YACzC,sBAAsB,CAAC,WAAW,CAAC,CAAC;QACtC,CAAC;IACH,CAAC,EAAE,CAAC,WAAW,EAAE,sBAAsB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;IAE3D,sDAAsD;IACtD,6DAA6D;IAC7D,IAAM,sBAAsB,GAAG,IAAA,eAAO,EACpC,cAAM,OAAA,IAAA,kCAAwB,EAAC,gBAAgB,EAAE,qBAAqB,CAAC,EAAjE,CAAiE,EACvE,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAC1C,CAAC;IAEF,iDAAiD;IACjD,OAAO,IAAA,eAAO,EACZ,cAAM,OAAA,CAAC;QACL,gBAAgB,EAAE,sBAAsB;QACxC,2BAA2B,6BAAA;QAC3B,OAAO,SAAA;QACP,OAAO,SAAA;QACP,QAAQ,UAAA;QACR,sBAAsB,wBAAA;QACtB,0BAA0B,4BAAA;QAC1B,qBAAqB,uBAAA;KACtB,CAAC,EATI,CASJ,EACF;QACE,sBAAsB;QACtB,2BAA2B;QAC3B,OAAO;QACP,OAAO;QACP,QAAQ;QACR,sBAAsB;QACtB,0BAA0B;QAC1B,qBAAqB;KACtB,CACF,CAAC;AACJ,CAAC;AAED,kBAAe,mBAAmB,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hook that provides Redux-powered actions for app notifications
|
|
3
3
|
* Integrates RTK Query with Redux slice actions
|
|
4
|
+
*
|
|
5
|
+
* Note: Templates are applied at display time in useAppNotifications, not here.
|
|
6
|
+
* This ensures templates are always fresh and avoids race conditions.
|
|
4
7
|
*/
|
|
5
8
|
export declare function useAppNotificationsActions(): {
|
|
6
9
|
loadMore: () => void;
|
|
@@ -45,12 +45,14 @@ var hooks_1 = require("../../store/hooks");
|
|
|
45
45
|
var appNotificationsSlice_1 = require("../../store/slices/appNotificationsSlice");
|
|
46
46
|
var appNotificationsApi_1 = require("../../store/api/appNotificationsApi");
|
|
47
47
|
var handleError_1 = require("../../utils/handleError");
|
|
48
|
-
var addNotificationsMessages_1 = __importDefault(require("../../helpers/addNotificationsMessages"));
|
|
49
48
|
var useProject_1 = __importDefault(require("../projects/useProject"));
|
|
50
49
|
var user_1 = require("../user");
|
|
51
50
|
/**
|
|
52
51
|
* Hook that provides Redux-powered actions for app notifications
|
|
53
52
|
* Integrates RTK Query with Redux slice actions
|
|
53
|
+
*
|
|
54
|
+
* Note: Templates are applied at display time in useAppNotifications, not here.
|
|
55
|
+
* This ensures templates are always fresh and avoids race conditions.
|
|
54
56
|
*/
|
|
55
57
|
function useAppNotificationsActions() {
|
|
56
58
|
var _this = this;
|
|
@@ -59,7 +61,6 @@ function useAppNotificationsActions() {
|
|
|
59
61
|
var projectIdFromSlice = (0, hooks_1.useReplykeSelector)(appNotificationsSlice_1.selectCurrentProjectId);
|
|
60
62
|
var page = (0, hooks_1.useReplykeSelector)(appNotificationsSlice_1.selectAppNotificationsPage);
|
|
61
63
|
var limit = (0, hooks_1.useReplykeSelector)(appNotificationsSlice_1.selectAppNotificationsLimit);
|
|
62
|
-
var notificationTemplates = (0, hooks_1.useReplykeSelector)(appNotificationsSlice_1.selectNotificationTemplates);
|
|
63
64
|
// Get project and user context (fallback to current hooks)
|
|
64
65
|
var projectIdFromHook = (0, useProject_1.default)().projectId;
|
|
65
66
|
var user = (0, user_1.useUser)().user;
|
|
@@ -107,7 +108,7 @@ function useAppNotificationsActions() {
|
|
|
107
108
|
}); }, [dispatch, projectId, user, markNotificationAsReadMutation]);
|
|
108
109
|
// Reset notifications action
|
|
109
110
|
var resetAppNotifications = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
110
|
-
var response, notifications, pagination,
|
|
111
|
+
var response, notifications, pagination, error_2;
|
|
111
112
|
return __generator(this, function (_a) {
|
|
112
113
|
switch (_a.label) {
|
|
113
114
|
case 0:
|
|
@@ -128,9 +129,9 @@ function useAppNotificationsActions() {
|
|
|
128
129
|
response = _a.sent();
|
|
129
130
|
if (response) {
|
|
130
131
|
notifications = response.data, pagination = response.pagination;
|
|
131
|
-
|
|
132
|
+
// Store raw notifications - templates applied at display time
|
|
132
133
|
dispatch((0, appNotificationsSlice_1.addNotifications)({
|
|
133
|
-
notifications:
|
|
134
|
+
notifications: notifications,
|
|
134
135
|
hasMore: pagination.hasMore,
|
|
135
136
|
isFirstPage: true,
|
|
136
137
|
}));
|
|
@@ -149,11 +150,10 @@ function useAppNotificationsActions() {
|
|
|
149
150
|
user,
|
|
150
151
|
triggerFetchNotifications,
|
|
151
152
|
limit,
|
|
152
|
-
notificationTemplates,
|
|
153
153
|
]);
|
|
154
154
|
// Fetch more notifications (internal action triggered by page changes)
|
|
155
155
|
var fetchMoreNotifications = (0, react_1.useCallback)(function (pageToFetch) { return __awaiter(_this, void 0, void 0, function () {
|
|
156
|
-
var response, notifications, pagination,
|
|
156
|
+
var response, notifications, pagination, error_3;
|
|
157
157
|
return __generator(this, function (_a) {
|
|
158
158
|
switch (_a.label) {
|
|
159
159
|
case 0:
|
|
@@ -172,9 +172,9 @@ function useAppNotificationsActions() {
|
|
|
172
172
|
response = _a.sent();
|
|
173
173
|
if (response) {
|
|
174
174
|
notifications = response.data, pagination = response.pagination;
|
|
175
|
-
|
|
175
|
+
// Store raw notifications - templates applied at display time
|
|
176
176
|
dispatch((0, appNotificationsSlice_1.addNotifications)({
|
|
177
|
-
notifications:
|
|
177
|
+
notifications: notifications,
|
|
178
178
|
hasMore: pagination.hasMore,
|
|
179
179
|
}));
|
|
180
180
|
}
|
|
@@ -195,7 +195,6 @@ function useAppNotificationsActions() {
|
|
|
195
195
|
user,
|
|
196
196
|
triggerFetchNotifications,
|
|
197
197
|
limit,
|
|
198
|
-
notificationTemplates,
|
|
199
198
|
]);
|
|
200
199
|
// Update unread count
|
|
201
200
|
var updateUnreadCount = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAppNotificationsActions.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications/useAppNotificationsActions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useAppNotificationsActions.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications/useAppNotificationsActions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,gEAyKC;AAxMD,+BAAoC;AACpC,2CAA2E;AAC3E,kFAWkD;AAClD,2EAK6C;AAC7C,uDAAsD;AACtD,sEAAgD;AAChD,gCAAkC;AAElC;;;;;;GAMG;AACH,SAAgB,0BAA0B;IAA1C,iBAyKC;IAxKC,IAAM,QAAQ,GAAG,IAAA,0BAAkB,GAAE,CAAC;IAEtC,gCAAgC;IAChC,IAAM,kBAAkB,GAAG,IAAA,0BAAkB,EAAC,8CAAsB,CAAC,CAAC;IACtE,IAAM,IAAI,GAAG,IAAA,0BAAkB,EAAC,kDAA0B,CAAC,CAAC;IAC5D,IAAM,KAAK,GAAG,IAAA,0BAAkB,EAAC,mDAA2B,CAAC,CAAC;IAE9D,2DAA2D;IACnD,IAAW,iBAAiB,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAC9C,IAAA,IAAI,GAAK,IAAA,cAAO,GAAE,KAAd,CAAe;IAE3B,8DAA8D;IAC9D,IAAM,SAAS,GAAG,kBAAkB,IAAI,iBAAiB,CAAC;IAE1D,kBAAkB;IACX,IAA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E,IAAA,yBAAW,EAAC,OAAK,EAAE,2CAA2C,CAAC,CAAC;oBAChE,MAAM,OAAK,CAAC;;;;SAEf,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,kCAAkC,CAAC,CAAC,CAAC;IAEpE,OAAO;QACL,QAAQ,UAAA;QACR,sBAAsB,wBAAA;QACtB,0BAA0B,4BAAA;QAC1B,qBAAqB,uBAAA;QACrB,sBAAsB,wBAAA,EAAE,kBAAkB;QAC1C,iBAAiB,mBAAA;KAClB,CAAC;AACJ,CAAC;AAED,kBAAe,0BAA0B,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { useEffect, useMemo } from "react";
|
|
2
2
|
import { useReplykeDispatch, useReplykeSelector } from "../../store/hooks";
|
|
3
|
-
import { setProjectContext, setLimit,
|
|
3
|
+
import { setProjectContext, setLimit, selectAppNotifications, selectUnreadCount, selectAppNotificationsLoading, selectAppNotificationsHasMore, selectAppNotificationsPage, selectCurrentProjectId, } from "../../store/slices/appNotificationsSlice";
|
|
4
4
|
import { useAppNotificationsActions } from "./useAppNotificationsActions";
|
|
5
5
|
import useProject from "../projects/useProject";
|
|
6
6
|
import { useUser } from "../user";
|
|
7
|
+
import addNotificationsMessages from "../../helpers/addNotificationsMessages";
|
|
7
8
|
/**
|
|
8
9
|
* Redux-powered hook that provides the exact same interface as useAppNotificationsData()
|
|
9
10
|
* This is a drop-in replacement for the Context-based hook
|
|
@@ -21,7 +22,7 @@ function useAppNotifications(_a) {
|
|
|
21
22
|
var hasMore = useReplykeSelector(selectAppNotificationsHasMore);
|
|
22
23
|
var currentPage = useReplykeSelector(selectAppNotificationsPage);
|
|
23
24
|
var currentProjectId = useReplykeSelector(selectCurrentProjectId);
|
|
24
|
-
// Get actions
|
|
25
|
+
// Get actions (templates are applied at display time, not fetch time)
|
|
25
26
|
var _d = useAppNotificationsActions(), loadMore = _d.loadMore, markNotificationAsRead = _d.markNotificationAsRead, markAllNotificationsAsRead = _d.markAllNotificationsAsRead, resetAppNotifications = _d.resetAppNotifications, fetchMoreNotifications = _d.fetchMoreNotifications, updateUnreadCount = _d.updateUnreadCount;
|
|
26
27
|
// Update Redux state when props change
|
|
27
28
|
useEffect(function () {
|
|
@@ -32,20 +33,6 @@ function useAppNotifications(_a) {
|
|
|
32
33
|
useEffect(function () {
|
|
33
34
|
dispatch(setLimit(limit));
|
|
34
35
|
}, [dispatch, limit]);
|
|
35
|
-
// Prevent infinite re-renders by comparing current vs new templates
|
|
36
|
-
var currentTemplates = useReplykeSelector(selectNotificationTemplates);
|
|
37
|
-
var templatesChanged = useMemo(function () {
|
|
38
|
-
// If no templates provided, skip comparison
|
|
39
|
-
if (!notificationTemplates)
|
|
40
|
-
return false;
|
|
41
|
-
// Deep comparison using JSON stringify
|
|
42
|
-
return (JSON.stringify(currentTemplates) !== JSON.stringify(notificationTemplates));
|
|
43
|
-
}, [currentTemplates, notificationTemplates]);
|
|
44
|
-
useEffect(function () {
|
|
45
|
-
if (notificationTemplates && templatesChanged) {
|
|
46
|
-
dispatch(setNotificationTemplates(notificationTemplates));
|
|
47
|
-
}
|
|
48
|
-
}, [dispatch, notificationTemplates, templatesChanged]);
|
|
49
36
|
// Fetch unread count on mount and when dependencies change
|
|
50
37
|
useEffect(function () {
|
|
51
38
|
if (projectId && user) {
|
|
@@ -64,9 +51,12 @@ function useAppNotifications(_a) {
|
|
|
64
51
|
fetchMoreNotifications(currentPage);
|
|
65
52
|
}
|
|
66
53
|
}, [currentPage, fetchMoreNotifications, projectId, user]);
|
|
54
|
+
// Apply templates at display time (not at fetch time)
|
|
55
|
+
// This ensures templates are always applied fresh from props
|
|
56
|
+
var templatedNotifications = useMemo(function () { return addNotificationsMessages(appNotifications, notificationTemplates); }, [appNotifications, notificationTemplates]);
|
|
67
57
|
// Return the same interface as the original hook
|
|
68
58
|
return useMemo(function () { return ({
|
|
69
|
-
appNotifications:
|
|
59
|
+
appNotifications: templatedNotifications,
|
|
70
60
|
unreadAppNotificationsCount: unreadAppNotificationsCount,
|
|
71
61
|
loading: loading,
|
|
72
62
|
hasMore: hasMore,
|
|
@@ -75,7 +65,7 @@ function useAppNotifications(_a) {
|
|
|
75
65
|
markAllNotificationsAsRead: markAllNotificationsAsRead,
|
|
76
66
|
resetAppNotifications: resetAppNotifications,
|
|
77
67
|
}); }, [
|
|
78
|
-
|
|
68
|
+
templatedNotifications,
|
|
79
69
|
unreadAppNotificationsCount,
|
|
80
70
|
loading,
|
|
81
71
|
hasMore,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAppNotifications.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications/useAppNotifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE3E,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,
|
|
1
|
+
{"version":3,"file":"useAppNotifications.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications/useAppNotifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE3E,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,sBAAsB,EACtB,iBAAiB,EACjB,6BAA6B,EAC7B,6BAA6B,EAC7B,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,OAAO,wBAAwB,MAAM,wCAAwC,CAAC;AAkB9E;;;GAGG;AACH,SAAS,mBAAmB,CAAC,EAGG;QAHH,qBAGC,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ications
|
|
3
3
|
* Integrates RTK Query with Redux slice actions
|
|
4
|
+
*
|
|
5
|
+
* Note: Templates are applied at display time in useAppNotifications, not here.
|
|
6
|
+
* This ensures templates are always fresh and avoids race conditions.
|
|
4
7
|
*/
|
|
5
8
|
export declare function useAppNotificationsActions(): {
|
|
6
9
|
loadMore: () => void;
|
|
@@ -36,15 +36,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
};
|
|
37
37
|
import { useCallback } from "react";
|
|
38
38
|
import { useReplykeDispatch, useReplykeSelector } from "../../store/hooks";
|
|
39
|
-
import { loadMore as loadMoreAction, resetNotifications, setLoading, addNotifications, markAsReadLocally, markAllAsReadLocally, setUnreadCount, selectCurrentProjectId, selectAppNotificationsPage, selectAppNotificationsLimit,
|
|
39
|
+
import { loadMore as loadMoreAction, resetNotifications, setLoading, addNotifications, markAsReadLocally, markAllAsReadLocally, setUnreadCount, selectCurrentProjectId, selectAppNotificationsPage, selectAppNotificationsLimit, } from "../../store/slices/appNotificationsSlice";
|
|
40
40
|
import { useLazyFetchAppNotificationsQuery, useMarkNotificationAsReadMutation, useMarkAllNotificationsAsReadMutation, useLazyCountUnreadNotificationsQuery, } from "../../store/api/appNotificationsApi";
|
|
41
41
|
import { handleError } from "../../utils/handleError";
|
|
42
|
-
import addNotificationsMessages from "../../helpers/addNotificationsMessages";
|
|
43
42
|
import useProject from "../projects/useProject";
|
|
44
43
|
import { useUser } from "../user";
|
|
45
44
|
/**
|
|
46
45
|
* Hook that provides Redux-powered actions for app notifications
|
|
47
46
|
* Integrates RTK Query with Redux slice actions
|
|
47
|
+
*
|
|
48
|
+
* Note: Templates are applied at display time in useAppNotifications, not here.
|
|
49
|
+
* This ensures templates are always fresh and avoids race conditions.
|
|
48
50
|
*/
|
|
49
51
|
export function useAppNotificationsActions() {
|
|
50
52
|
var _this = this;
|
|
@@ -53,7 +55,6 @@ export function useAppNotificationsActions() {
|
|
|
53
55
|
var projectIdFromSlice = useReplykeSelector(selectCurrentProjectId);
|
|
54
56
|
var page = useReplykeSelector(selectAppNotificationsPage);
|
|
55
57
|
var limit = useReplykeSelector(selectAppNotificationsLimit);
|
|
56
|
-
var notificationTemplates = useReplykeSelector(selectNotificationTemplates);
|
|
57
58
|
// Get project and user context (fallback to current hooks)
|
|
58
59
|
var projectIdFromHook = useProject().projectId;
|
|
59
60
|
var user = useUser().user;
|
|
@@ -101,7 +102,7 @@ export function useAppNotificationsActions() {
|
|
|
101
102
|
}); }, [dispatch, projectId, user, markNotificationAsReadMutation]);
|
|
102
103
|
// Reset notifications action
|
|
103
104
|
var resetAppNotifications = useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
104
|
-
var response, notifications, pagination,
|
|
105
|
+
var response, notifications, pagination, error_2;
|
|
105
106
|
return __generator(this, function (_a) {
|
|
106
107
|
switch (_a.label) {
|
|
107
108
|
case 0:
|
|
@@ -122,9 +123,9 @@ export function useAppNotificationsActions() {
|
|
|
122
123
|
response = _a.sent();
|
|
123
124
|
if (response) {
|
|
124
125
|
notifications = response.data, pagination = response.pagination;
|
|
125
|
-
|
|
126
|
+
// Store raw notifications - templates applied at display time
|
|
126
127
|
dispatch(addNotifications({
|
|
127
|
-
notifications:
|
|
128
|
+
notifications: notifications,
|
|
128
129
|
hasMore: pagination.hasMore,
|
|
129
130
|
isFirstPage: true,
|
|
130
131
|
}));
|
|
@@ -143,11 +144,10 @@ export function useAppNotificationsActions() {
|
|
|
143
144
|
user,
|
|
144
145
|
triggerFetchNotifications,
|
|
145
146
|
limit,
|
|
146
|
-
notificationTemplates,
|
|
147
147
|
]);
|
|
148
148
|
// Fetch more notifications (internal action triggered by page changes)
|
|
149
149
|
var fetchMoreNotifications = useCallback(function (pageToFetch) { return __awaiter(_this, void 0, void 0, function () {
|
|
150
|
-
var response, notifications, pagination,
|
|
150
|
+
var response, notifications, pagination, error_3;
|
|
151
151
|
return __generator(this, function (_a) {
|
|
152
152
|
switch (_a.label) {
|
|
153
153
|
case 0:
|
|
@@ -166,9 +166,9 @@ export function useAppNotificationsActions() {
|
|
|
166
166
|
response = _a.sent();
|
|
167
167
|
if (response) {
|
|
168
168
|
notifications = response.data, pagination = response.pagination;
|
|
169
|
-
|
|
169
|
+
// Store raw notifications - templates applied at display time
|
|
170
170
|
dispatch(addNotifications({
|
|
171
|
-
notifications:
|
|
171
|
+
notifications: notifications,
|
|
172
172
|
hasMore: pagination.hasMore,
|
|
173
173
|
}));
|
|
174
174
|
}
|
|
@@ -189,7 +189,6 @@ export function useAppNotificationsActions() {
|
|
|
189
189
|
user,
|
|
190
190
|
triggerFetchNotifications,
|
|
191
191
|
limit,
|
|
192
|
-
notificationTemplates,
|
|
193
192
|
]);
|
|
194
193
|
// Update unread count
|
|
195
194
|
var updateUnreadCount = useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAppNotificationsActions.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications/useAppNotificationsActions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EACL,QAAQ,IAAI,cAAc,EAC1B,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,
|
|
1
|
+
{"version":3,"file":"useAppNotificationsActions.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications/useAppNotificationsActions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC3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