Navigating to the Withdraw Page

Learn how to navigate between different pages inside the application.

We'll cover the following

Overview

In the previous section, we created a withdraw page. We should also build a way for the users to navigate to it. We’ll build a header element for our application that will contain links to the home page and withdraw page. This header should appear in the same spot for both pages. We could again create a component that both pages will share, but another way of doing it could be to use the app page (pages/_app.js) of our Next.js project.

The app page

The app page is a special page in a Next.js project that we can use to share a functionality or state between different pages. We can think of it as a parent component that contains all the other pages’ components. This makes it an excellent place to implement a layout that will be common between all pages. A page header is one such layout element.

This is what the app component looks like by default:

Get hands-on with 1200+ tech skills courses.