react-notify-sdk 1.0.59 → 1.0.61

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.
@@ -93,9 +93,10 @@ export const FeatureMessageProvider = ({ projectKey, }) => {
93
93
  .select('*')
94
94
  .eq('project_key', projectKey)
95
95
  .eq('route', pathname)
96
+ .eq('base_url', window.location.origin)
96
97
  .eq('is_active', true)
97
98
  .order('created_at', { ascending: false });
98
- const match = data?.find((msg) => routeMatches(msg.route, pathname, msg.url));
99
+ const match = data?.find((msg) => routeMatches(msg.route, pathname, msg.base_url));
99
100
  if (match && !isDismissed(match)) {
100
101
  if (fadeOutTimer)
101
102
  clearTimeout(fadeOutTimer); // Clear any pending timeout
@@ -117,7 +118,7 @@ export const FeatureMessageProvider = ({ projectKey, }) => {
117
118
  table: 'feature_messages',
118
119
  }, (payload) => {
119
120
  const msg = payload.new;
120
- if (msg.project_key === projectKey && msg.is_active && routeMatches(msg.route, pathname, msg.url)) {
121
+ if (msg.project_key === projectKey && msg.is_active && routeMatches(msg.route, pathname, msg.base_url)) {
121
122
  if (fadeOutTimer)
122
123
  clearTimeout(fadeOutTimer); // Clear any pending timeout
123
124
  setMessage(msg);
package/dist/types.d.ts CHANGED
@@ -18,7 +18,7 @@ export type FeatureMessages = {
18
18
  type?: 'Information' | 'Warning' | 'Error';
19
19
  click_action?: 'view only' | 'navigate' | 'external' | 'dismiss';
20
20
  click_url?: string;
21
- url: string;
21
+ base_url: string;
22
22
  };
23
23
  export type FeatureMessageProviderProps = {
24
24
  projectKey: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-notify-sdk",
3
- "version": "1.0.59",
3
+ "version": "1.0.61",
4
4
  "description": "SDK for displaying real-time route-specific messages in React apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",