Component: Back Button
Purpose: Provides a button for navigating back, with intelligent handling of different scenarios including redirect URLs and browser history.
The Back Button component uses the following logic to determine its behaviour when clicked:
If there is a "redirect" parameter in the current URL's search params (for example: ), then navigate to the URL while preserving other URL parameters (except "redirect").
If no "redirect" URL is present but there's a previous page in the browser history, then navigate back to the previous page.
If there's no "redirect" URL and no previous page in history, then navigate to the origin of the current page (window.location.origin).
Props
Prop Label
Type
Default Value
Info
buttonLabel
Button Label
string
Back
Last updated
Was this helpful?

