Connecting mirror symmetry in 3D and 2D via localization