Next.js provides a number of hooks for accessing routing information from client components.
Try navigating each page and observing the output of each hook called from the current routes layout.js and page.js files.
layout.js
page.js