added function for calculating the offset and fixed the offset of the calculation for the element
added function for calculating the offset and fixed the offset of the calculation for the element

fisshy/react-scroll