2 Different Reactions, 1 Answer!
As stated by Eiichiro Oda Luffy reacted to Nami’s naked body (in volumes 18 and 23, and both times it happened, Usopp was with him) because when he’s with Usopp, who’s the same age, it’s like a kid on a school trip: his bad side comes out!! So the culprit is definitely Usopp!
In other words, when Luffy is alone, his reaction with Nami is what it was with Hancock. He’s interested, but he’s not entranced by them.