react-notify-sdk 1.0.63 → 1.0.64
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.
|
@@ -98,12 +98,20 @@ export const FeatureMessageProvider = ({ projectKey, }) => {
|
|
|
98
98
|
const origin = window.location.origin;
|
|
99
99
|
// 🔹 1. Fetch ALL active messages once per project
|
|
100
100
|
const fetchMessages = async () => {
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
.
|
|
101
|
+
const response = await fetch("https://dhgnstjrkeuqnsapwcec.functions.supabase.co/get-feature-message", {
|
|
102
|
+
method: "POST",
|
|
103
|
+
headers: {
|
|
104
|
+
"Content-Type": "application/json",
|
|
105
|
+
},
|
|
106
|
+
body: JSON.stringify({
|
|
107
|
+
projectKey,
|
|
108
|
+
pathname: pathname,
|
|
109
|
+
origin: origin,
|
|
110
|
+
}),
|
|
111
|
+
});
|
|
112
|
+
if (!response.ok)
|
|
113
|
+
return null;
|
|
114
|
+
const data = await response.json();
|
|
107
115
|
if (data) {
|
|
108
116
|
setMessages(data);
|
|
109
117
|
}
|