From 1dd88fabdf2646e40c6d2da5101768b3251af407 Mon Sep 17 00:00:00 2001 From: Amirhossein Mahmoodi Date: Tue, 13 Aug 2024 12:01:50 +0330 Subject: [PATCH 1/3] fixed bug --- src/app/page.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/page.js b/src/app/page.js index a98fa16..2997c35 100644 --- a/src/app/page.js +++ b/src/app/page.js @@ -1,8 +1,7 @@ import { redirect } from "next/navigation"; -const prefix = process.env.NODE_ENV === "production" ? "/v3" : ""; function Page() { - redirect(prefix + "/dashboard", "replace"); + redirect("/dashboard", "replace"); return null; } From 7be5f0e4bb78401910bbd2f05128cfa0504b4585 Mon Sep 17 00:00:00 2001 From: Amirhossein Mahmoodi Date: Tue, 13 Aug 2024 12:08:03 +0330 Subject: [PATCH 2/3] fixed bug --- src/lib/contexts/tableSetting.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/lib/contexts/tableSetting.js b/src/lib/contexts/tableSetting.js index 2d565b6..0484511 100644 --- a/src/lib/contexts/tableSetting.js +++ b/src/lib/contexts/tableSetting.js @@ -5,12 +5,17 @@ import LZString from "lz-string"; export const TableSettingContext = createContext(); const decompressData = (compressedData) => { - const decompressed = LZString.decompressFromUTF16(compressedData); - if (decompressed === null) { + try { + const decompressed = LZString.decompressFromUTF16(compressedData); + if (decompressed === null) { + localStorage.removeItem("_setting-app"); + return null; + } else { + return JSON.parse(decompressed); + } + } catch (error) { localStorage.removeItem("_setting-app"); return null; - } else { - return JSON.parse(decompressed); } }; From 0d5c666c1f54b43ddd151a27b9f38cb7abe0cbe7 Mon Sep 17 00:00:00 2001 From: Amirhossein Mahmoodi Date: Tue, 13 Aug 2024 12:08:40 +0330 Subject: [PATCH 3/3] change version --- .env.local.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.local.example b/.env.local.example index 542aa97..898913f 100644 --- a/.env.local.example +++ b/.env.local.example @@ -1,3 +1,3 @@ -NEXT_PUBLIC_VERSION="0.6.0" +NEXT_PUBLIC_VERSION="0.6.1" NEXT_PUBLIC_API_URL="https://rms.witel.ir" NEXT_PUBLIC_MAPTILE_ENDPOINT="https://rmsmap.rmto.ir/141map" \ No newline at end of file