Merge branch 'release/v0.4.3'

This commit is contained in:
Amirhossein Mahmoodi
2024-07-31 14:29:38 +03:30
3 changed files with 20 additions and 7 deletions

View File

@@ -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"

View File

@@ -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 <CacheProvider value={cache}>{props.children}</CacheProvider>;
return <CacheProvider value={createEmotionCache()}>{props.children}</CacheProvider>;
};
export default cacheProviderRtl;

View File

@@ -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 <LinearProgress sx={{ borderRadius: 2 }} />;
return (
<DataTableContext.Provider value={{ filterData, setFilterData, sortData, setSortData, hideData, setHideData }}>