Function useOnClickOrFocusAway