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 { data } = await supabaseClient
102
- .from("feature_messages")
103
- .select("*")
104
- .eq("project_key", projectKey)
105
- .eq("is_active", true)
106
- .order("created_at", { ascending: false });
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-notify-sdk",
3
- "version": "1.0.63",
3
+ "version": "1.0.64",
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",