From 9cf6b7d7f574a0d1d7793b51489cfee2016d9c9f Mon Sep 17 00:00:00 2001 From: Erfan Mola Date: Mon, 9 Oct 2023 01:40:35 +0330 Subject: [PATCH] Update LocalProvider --- package-lock.json | 4 ++-- package.json | 2 +- src/providers/LocaleProvider.vue | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 572c404..54c81b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@erfanmola/televue", - "version": "0.1.2", + "version": "0.1.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@erfanmola/televue", - "version": "0.1.2", + "version": "0.1.3", "dependencies": { "@twa-dev/sdk": "^6.9.0", "js-crypto-hmac": "^1.0.7", diff --git a/package.json b/package.json index 6acc2d6..fc43997 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@erfanmola/televue", - "version": "0.1.2", + "version": "0.1.3", "type": "module", "files": [ "dist" diff --git a/src/providers/LocaleProvider.vue b/src/providers/LocaleProvider.vue index 7878d2f..03daa22 100644 --- a/src/providers/LocaleProvider.vue +++ b/src/providers/LocaleProvider.vue @@ -4,7 +4,7 @@ const props = defineProps({ locale: { - default: WebApp.initDataUnsafe.user?.language_code?.toString().toLowerCase() || 'en', + default: null, type: String, }, direction: { @@ -27,7 +27,7 @@ document.body.classList.add(direction); - provide('locale', props.locale); + provide('locale', props.locale || WebApp.initDataUnsafe.user?.language_code?.toString().toLowerCase() || 'en'); provide('direction', props.direction || direction);