Server side trpc call
Hi,
In the attached picture, I am passing username from getserverside props down to my Profile page and I am doing a trpc call to query my db to check if the user exists. This works but I am currently displaying 'user not found' then displaying the user if they exist. I would like to carry out this call on the server so that I can avoid the lag and can display the user or 'user not found' instantly.
Do you have any suggestions or tips on how I can carry this out?
In the attached picture, I am passing username from getserverside props down to my Profile page and I am doing a trpc call to query my db to check if the user exists. This works but I am currently displaying 'user not found' then displaying the user if they exist. I would like to carry out this call on the server so that I can avoid the lag and can display the user or 'user not found' instantly.
Do you have any suggestions or tips on how I can carry this out?

