From f3d76d0e1841ba7cb20dcb83c1321f773a6fc4fc Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Mon, 14 Jun 2021 22:36:07 +0300 Subject: [PATCH] Fix permanent switching to WebK --- src/components/left/main/LeftMainHeader.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/left/main/LeftMainHeader.tsx b/src/components/left/main/LeftMainHeader.tsx index acdbd76f0..56afcd3b4 100644 --- a/src/components/left/main/LeftMainHeader.tsx +++ b/src/components/left/main/LeftMainHeader.tsx @@ -54,6 +54,7 @@ const ANIMATION_LEVEL_OPTIONS = [0, 1, 2]; const LEGACY_VERSION_URL = 'https://web.telegram.org/?legacy=1'; const WEBK_VERSION_URL = 'https://web.telegram.org/k/'; +const PERMANENT_VERSION_KEY = 'kz_version'; const LeftMainHeader: FC = ({ content, @@ -146,7 +147,7 @@ const LeftMainHeader: FC = ({ }, [animationLevel, setSettingOption]); const handleSwitchToWebK = () => { - localStorage.setItem('kz_version', 'K'); + localStorage.setItem(PERMANENT_VERSION_KEY, JSON.stringify('K')); }; const isSearchFocused = (