Naps during the day

How long do you let your LO nap for?? some days my babe will go about 3 hours but then people tell me I shouldn’t let him sleep for that long during the day or else he won’t sleep at night