AlertNavigateOnClose

This component itself doesn't read the query string - it's a dismissible Alert that, when closed, navigates (via router.replace) to href (defaulting to the current pathname), which is how a caller clears a server-action-set query string parameter after the user has seen the message. This demo page reads its own ?status= query parameter to decide whether to show the alert at all.

Try it: ?status=success or ?status=error. Dismissing the alert below will strip the query parameter from the URL.