@dubsdotapp/expo 0.2.3 → 0.2.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dubsdotapp/expo",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "React Native SDK for the Dubs betting platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
package/src/client.ts CHANGED
@@ -378,7 +378,7 @@ export class DubsClient {
378
378
 
379
379
  /** Fetch the app's UI customization config (accent color, icon, tagline) */
380
380
  async getAppConfig(): Promise<UiConfig> {
381
- const res = await this.request<{ uiConfig: UiConfig }>('GET', '/apps/config');
382
- return res.uiConfig || {};
381
+ const res = await this.request<{ data: { uiConfig: UiConfig } }>('GET', '/apps/config');
382
+ return res.data?.uiConfig || {};
383
383
  }
384
384
  }
package/src/provider.tsx CHANGED
@@ -83,7 +83,15 @@ export function DubsProvider({
83
83
  // Fetch developer UI config on mount (silent fail = default theme)
84
84
  const [uiConfig, setUiConfig] = useState<UiConfig | null>(null);
85
85
  useEffect(() => {
86
- client.getAppConfig().then(setUiConfig).catch(() => setUiConfig({}));
86
+ client.getAppConfig()
87
+ .then((config) => {
88
+ console.log('[DubsProvider] UI config loaded:', JSON.stringify(config));
89
+ setUiConfig(config);
90
+ })
91
+ .catch((err) => {
92
+ console.log('[DubsProvider] UI config fetch failed, using defaults:', err?.message);
93
+ setUiConfig({});
94
+ });
87
95
  }, [client]);
88
96
 
89
97
  // Wait for config before rendering so accent color is applied on first paint