l-min-components 1.7.1531 → 1.7.1533
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
|
@@ -7,8 +7,9 @@ if (!window.translationCache) {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const CACHE_DURATION = 60 * 60 * 1000; // 1 hour in milliseconds
|
|
10
|
-
const S3_BASE_URL =
|
|
11
|
-
"
|
|
10
|
+
const S3_BASE_URL = `https://learngual-bucket.sfo3.digitaloceanspaces.com/${
|
|
11
|
+
window.location.hostname.includes("staging") ? "" : "learngual-production/"
|
|
12
|
+
}media/media/`;
|
|
12
13
|
|
|
13
14
|
const useTranslation = (initialSentences = []) => {
|
|
14
15
|
const value = localStorage?.getItem("defaultLang");
|
|
@@ -82,7 +83,11 @@ const useTranslation = (initialSentences = []) => {
|
|
|
82
83
|
try {
|
|
83
84
|
// Fetch from S3 - master JSON contains all languages
|
|
84
85
|
const response = await fetch(
|
|
85
|
-
`${S3_BASE_URL}
|
|
86
|
+
`${S3_BASE_URL}${
|
|
87
|
+
window.location.hostname.includes("staging")
|
|
88
|
+
? "qFpINMa05DrgUgzO0PEboReejximpq2r3VL2AmFZAwIq6fTN3A.json"
|
|
89
|
+
: "qFpINMa05DrgUgzO0PEboReejximpq2r3VL2AmFZAwIq6fTN3A.json"
|
|
90
|
+
}`
|
|
86
91
|
);
|
|
87
92
|
|
|
88
93
|
if (!response.ok) {
|