I added console.log() functions to understand what is happening but nothing logs to the console, neither it throws an error.
import getTopicPage from "@/app/lib/getTopicPage";
type Props = {
params: {
topic: string;
pageNumber: string;
};
};
export default function TopicPage(props: any) {
return <div>{props.data}</div>;
}
export async function getServerSideProps(props: Props) {
const { topic, pageNumber } = props.params;
console.log(topic, pageNumber);
const data = await getTopicPage(topic, pageNumber);
console.log(data);
return { props: { data } };
}