Ideally you should go for 7700k and 1050ti and upgrade to a better card down the line as card prices are all over the place currently. That way you have a better cpu to last much longer.
But this is a tricky mix and match in either direction. Depends also a lot on the games you play.