formatting
This commit is contained in:
@@ -23,7 +23,7 @@ const DataTableProvider = ({ children, user_id, page_name, table_name, columns }
|
||||
const filterValues = flatColumns.reduce((acc, column) => {
|
||||
if (!column.enableColumnFilter) return acc;
|
||||
const storeFilter = settingStore?.[user_id]?.[page_name]?.[table_name]?.["filters"]?.find(
|
||||
(filter) => filter.id === column.id,
|
||||
(filter) => filter.id === column.id
|
||||
);
|
||||
if (column.datatype === "array") {
|
||||
acc[column.id] = {
|
||||
@@ -100,7 +100,7 @@ const DataTableProvider = ({ children, user_id, page_name, table_name, columns }
|
||||
position: "bottom-left",
|
||||
draggable: true,
|
||||
autoClose: false,
|
||||
},
|
||||
}
|
||||
);
|
||||
} else {
|
||||
toast.update("keep_data", {
|
||||
|
||||
@@ -49,7 +49,7 @@ export const AuthProvider = ({ children }) => {
|
||||
clearUser();
|
||||
changeAuthState(false);
|
||||
changeInitAuth(true);
|
||||
}
|
||||
};
|
||||
|
||||
const getUser = useCallback(async () => {
|
||||
try {
|
||||
@@ -77,7 +77,7 @@ export const AuthProvider = ({ children }) => {
|
||||
isAuth: state.isAuth,
|
||||
initAuthState: state.initAuthState,
|
||||
getUser,
|
||||
logout
|
||||
logout,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
|
||||
@@ -130,4 +130,4 @@ export const TableSettingProvider = ({ children }) => {
|
||||
{children}
|
||||
</TableSettingContext.Provider>
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ const defaultOptions = {
|
||||
};
|
||||
|
||||
const useRequest = (initOptions) => {
|
||||
const { logout } = useAuth()
|
||||
const { logout } = useAuth();
|
||||
|
||||
const _options = Object.assign({}, defaultOptions, initOptions);
|
||||
|
||||
@@ -38,7 +38,8 @@ const useRequest = (initOptions) => {
|
||||
errorResponse(
|
||||
error.response,
|
||||
mergedOptions.notification.show && mergedOptions.notification.failed,
|
||||
"request_data", logout
|
||||
"request_data",
|
||||
logout
|
||||
);
|
||||
}
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user