i am trying to redirect to different page based on the role of user but on the page where i am checking this condition i have used
export const getServerSideProps = withPageAuthRequired();
and because of this server side props i am not able to use router.push() since it can only be used on client side
So how can i redirect the user from this page to different page if the role is not satisfied please help