@tagadapay/plugin-sdk 2.7.25 → 2.7.27
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.
|
@@ -4,6 +4,9 @@ const DEFAULT_PREFIXES = ['', 'VITE_', 'REACT_APP_', 'NEXT_PUBLIC_'];
|
|
|
4
4
|
* using a list of supported prefixes.
|
|
5
5
|
*/
|
|
6
6
|
export function resolveEnvValue(key, prefixes = DEFAULT_PREFIXES) {
|
|
7
|
+
console.log('process?.env', process?.env);
|
|
8
|
+
console.log('import?.meta', import.meta);
|
|
9
|
+
console.log('window', window);
|
|
7
10
|
for (const prefix of prefixes) {
|
|
8
11
|
const envKey = prefix ? `${prefix}${key}` : key;
|
|
9
12
|
if (typeof process !== 'undefined' && process?.env?.[envKey]) {
|
|
@@ -69,7 +69,7 @@ export const useTranslation = (options = {}) => {
|
|
|
69
69
|
return browserLang;
|
|
70
70
|
}
|
|
71
71
|
return defaultLanguage;
|
|
72
|
-
}, [defaultLanguage]);
|
|
72
|
+
}, [defaultLanguage, currentLanguage]);
|
|
73
73
|
const t = useCallback((text, fallback, params, languageCode) => {
|
|
74
74
|
// Helper function to interpolate params into the translated string
|
|
75
75
|
const interpolate = (str, params) => {
|
|
@@ -175,6 +175,9 @@ rawPluginConfig, }) {
|
|
|
175
175
|
const envFromVariables = resolveEnvironmentFromVariables();
|
|
176
176
|
const detectedEnv = environment || envFromVariables || detectEnvironment();
|
|
177
177
|
const config = getEnvironmentConfig(detectedEnv);
|
|
178
|
+
console.log('envFromVariables', envFromVariables);
|
|
179
|
+
console.log('detectedEnv', detectedEnv);
|
|
180
|
+
console.log('config', config);
|
|
178
181
|
// Log environment detection for debugging
|
|
179
182
|
if (environment) {
|
|
180
183
|
console.log(`[TagadaSDK] Using explicit environment: ${environment}`);
|