Merge branch 'release/v0.4.3'
This commit is contained in:
@@ -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_API_URL="https://rms.witel.ir"
|
||||||
NEXT_PUBLIC_MAPTILE_ENDPOINT="https://rmsmap.rmto.ir/141map"
|
NEXT_PUBLIC_MAPTILE_ENDPOINT="https://rmsmap.rmto.ir/141map"
|
||||||
@@ -4,13 +4,25 @@ import { prefixer } from "stylis";
|
|||||||
import stylisRTLPlugin from "stylis-plugin-rtl";
|
import stylisRTLPlugin from "stylis-plugin-rtl";
|
||||||
import { CacheProvider } from "@emotion/react";
|
import { CacheProvider } from "@emotion/react";
|
||||||
|
|
||||||
const cache = createCache({
|
const isBrowser = typeof document !== 'undefined';
|
||||||
key: "mui-rtl",
|
|
||||||
stylisPlugins: [prefixer, stylisRTLPlugin],
|
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) => {
|
const cacheProviderRtl = (props) => {
|
||||||
return <CacheProvider value={cache}>{props.children}</CacheProvider>;
|
return <CacheProvider value={createEmotionCache()}>{props.children}</CacheProvider>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default cacheProviderRtl;
|
export default cacheProviderRtl;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { toast } from "react-toastify";
|
|||||||
import useTableSetting from "@/lib/hooks/useTableSetting";
|
import useTableSetting from "@/lib/hooks/useTableSetting";
|
||||||
import { flattenArrayOfObjects } from "@/core/utils/flattenArrayOfObjects";
|
import { flattenArrayOfObjects } from "@/core/utils/flattenArrayOfObjects";
|
||||||
import AskForKeepData from "@/core/components/NotificationDesign/AskForKeepData";
|
import AskForKeepData from "@/core/components/NotificationDesign/AskForKeepData";
|
||||||
|
import { LinearProgress } from "@mui/material";
|
||||||
|
|
||||||
export const DataTableContext = createContext();
|
export const DataTableContext = createContext();
|
||||||
|
|
||||||
@@ -125,7 +126,7 @@ const DataTableProvider = ({ children, user_id, page_name, table_name, columns }
|
|||||||
}
|
}
|
||||||
}, [filterData, sortData, hideData]);
|
}, [filterData, sortData, hideData]);
|
||||||
|
|
||||||
if (!isInitStates) return null;
|
if (!isInitStates) return <LinearProgress sx={{ borderRadius: 2 }} />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DataTableContext.Provider value={{ filterData, setFilterData, sortData, setSortData, hideData, setHideData }}>
|
<DataTableContext.Provider value={{ filterData, setFilterData, sortData, setSortData, hideData, setHideData }}>
|
||||||
|
|||||||
Reference in New Issue
Block a user