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 diff --git a/src/core/utils/cacheRtl.js b/src/core/utils/cacheRtl.js index 1393e2e..6cf5267 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; 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 (