try how to trans function from server-side to client-side