refactor du système de routing (EXPORTS DES SETTINGS DRUPAL)
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
export function useUtils() {
|
||||
const isObjectEmpty = (obj) => {
|
||||
if (!obj || typeof obj !== 'object') return true;
|
||||
|
||||
return !Object.keys(obj).some((key) => {
|
||||
const value = obj[key];
|
||||
if (Array.isArray(value)) return value.length > 0;
|
||||
if (typeof value === 'object') return !isObjectEmpty(value);
|
||||
return value !== null && value !== undefined && value !== '';
|
||||
});
|
||||
};
|
||||
|
||||
const scrollTop = () => {
|
||||
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||
};
|
||||
|
||||
return {
|
||||
isObjectEmpty,
|
||||
scrollTop,
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user