A large thermal mass should be provided on the PCB to sink heat out of the MAX30101 via pins 8-10. As this thermal pad can also conduct heat into the part, these pins should be oriented as far from any external heat source as possible.
Ideally, the component should be oriented such that any heat from an external source is centered along its axis to minimize any thermal gradients across the pins/die.