How to implement conditional 'go back' button in nextjs 13

116 views Asked by At

I have a webview app that has a header component on each page, the header should render <- (go back button) if user is not on the home page and have the name of that page

if I add this header component in the layout.ts how do I change the "name" for each page?

also for some of nested pages I need to manually specify where to go back(for example on step 3 "go back" should navigate to step 1)

0

There are 0 answers