@bbki.ng/site 5.3.1 → 5.4.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @bbki.ng/site
2
2
 
3
+ ## 5.4.0
4
+
3
5
  ## 5.3.1
4
6
 
5
7
  ## 5.3.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbki.ng/site",
3
- "version": "5.3.1",
3
+ "version": "5.4.0",
4
4
  "description": "code behind bbki.ng",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -3,8 +3,8 @@ import { baseFetcher, withBBApi } from "@/utils";
3
3
  import { API_CF_ENDPOINT } from "@/constants/routes";
4
4
 
5
5
  // In dev, use /api prefix to leverage Vite proxy to localhost:8787
6
- const isDev = typeof window !== "undefined" && /^http:\/\/localhost/.test(window.location.href);
7
- const streamingFetcher = isDev
6
+ const isProd = typeof window !== "undefined" && /^https:\/\/bbki.ng/.test(window.location.href);
7
+ const streamingFetcher = !isProd
8
8
  ? (resource: string, init?: RequestInit) => baseFetcher(`/api/${resource}`, init)
9
9
  : withBBApi(baseFetcher)(API_CF_ENDPOINT);
10
10