Wifi connects only when close to router


AC Question

I have samsung j5, recently i fell it into water and screen was completely gone.I sent it to service and they replaced the screen.Now, i have another problem.Phone connects wifi only when router is close.After 2-3 meters, it cannot see the connection.Does anyone know anything to do?I returned to factory settings but it didnt work.I was not able to test the phone before sending to service because there was no wifi available around.