How to add new router to project

Viewed 66

I developing exam feature
I want create page detail exams. But when i add

{
   path: 'exams/:qid',
   page: 'pages/Exams/Detail',
}

and create pages/Exams/Detail/index.tsx

const Index = () => {
  return <div>Exam page</div>;
};

export default Index;

When i go to to http://localhost:3000/exams/D1qo1 then screen show loading

image.png

How to add new page? Please help me!

1 Answers

Judging from your code, there is no problem with the routes and pages you added. The reason why you stay on the loading page is most likely because you have not modified the local request API.

You can refer to this link development