From 2d2e4ab17975f34ec3045b75cc387dea3152ecc9 Mon Sep 17 00:00:00 2001 From: Amirhossein Mahmoodi Date: Wed, 31 Jul 2024 11:09:30 +0330 Subject: [PATCH 1/4] fixed bug cache mui --- src/core/utils/cacheRtl.js | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/core/utils/cacheRtl.js b/src/core/utils/cacheRtl.js index 1393e2e..80ac1c4 100644 --- a/src/core/utils/cacheRtl.js +++ b/src/core/utils/cacheRtl.js @@ -4,13 +4,25 @@ import { prefixer } from "stylis"; import stylisRTLPlugin from "stylis-plugin-rtl"; import { CacheProvider } from "@emotion/react"; -const cache = createCache({ - key: "mui-rtl", - stylisPlugins: [prefixer, stylisRTLPlugin], -}); +const isBrowser = typeof document !== 'undefined'; + +const createEmotionCache = () => { + let insertionPoint; + + if (isBrowser) { + const emotionInsertionPoint = document.querySelector('meta[name="emotion-insertion-point"]'); + insertionPoint = emotionInsertionPoint ?? undefined; + } + + return createCache({ + insertionPoint, + key: "mui-rtl", + stylisPlugins: [prefixer, stylisRTLPlugin], + });; +}; const cacheProviderRtl = (props) => { - return {props.children}; + return {props.children}; }; export default cacheProviderRtl; From 2972a0a3aef3ad93d9c6e98baa36d0f17bf85cbb Mon Sep 17 00:00:00 2001 From: Amirhossein Mahmoodi Date: Wed, 31 Jul 2024 11:39:32 +0330 Subject: [PATCH 2/4] fixed bug cache mui --- src/core/utils/cacheRtl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/utils/cacheRtl.js b/src/core/utils/cacheRtl.js index 80ac1c4..6cf5267 100644 --- a/src/core/utils/cacheRtl.js +++ b/src/core/utils/cacheRtl.js @@ -18,7 +18,7 @@ const createEmotionCache = () => { insertionPoint, key: "mui-rtl", stylisPlugins: [prefixer, stylisRTLPlugin], - });; + }); }; const cacheProviderRtl = (props) => { From 651870a2764832ae4b7fb0f818e5eec555641f00 Mon Sep 17 00:00:00 2001 From: Amirhossein Mahmoodi Date: Wed, 31 Jul 2024 13:31:22 +0330 Subject: [PATCH 3/4] update --- src/lib/contexts/DataTable.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/contexts/DataTable.js b/src/lib/contexts/DataTable.js index f5a625d..f25cde0 100644 --- a/src/lib/contexts/DataTable.js +++ b/src/lib/contexts/DataTable.js @@ -3,6 +3,7 @@ import { toast } from "react-toastify"; import useTableSetting from "@/lib/hooks/useTableSetting"; import { flattenArrayOfObjects } from "@/core/utils/flattenArrayOfObjects"; import AskForKeepData from "@/core/components/NotificationDesign/AskForKeepData"; +import { LinearProgress } from "@mui/material"; export const DataTableContext = createContext(); @@ -125,7 +126,7 @@ const DataTableProvider = ({ children, user_id, page_name, table_name, columns } } }, [filterData, sortData, hideData]); - if (!isInitStates) return null; + if (!isInitStates) return ; return ( From 80e7aa14febe2a84c57f56bad942f5f1e32b63a9 Mon Sep 17 00:00:00 2001 From: Amirhossein Mahmoodi Date: Wed, 31 Jul 2024 14:29:19 +0330 Subject: [PATCH 4/4] change version --- .env.local.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.local.example b/.env.local.example index 0977cbb..3758765 100644 --- a/.env.local.example +++ b/.env.local.example @@ -1,3 +1,3 @@ -NEXT_PUBLIC_VERSION="0.4.0" +NEXT_PUBLIC_VERSION="0.4.3" NEXT_PUBLIC_API_URL="https://rms.witel.ir" NEXT_PUBLIC_MAPTILE_ENDPOINT="https://rmsmap.rmto.ir/141map" \ No newline at end of file