useUrl

The useUrl hook retrieves the current URL in a server or client component.