text: export const getTargetElement = target => {
    if (!target) return null;
  
    let targetElement;
  
    if (typeof target === 'function') {
      targetElement = target();
    } else if ('current' in target) {
      targetElement = target.current;
    } else {
      targetElement = target;
    }
  
    return targetElement;
  };
  