When you press cancel, you will return to the previous page you were standing on
If Canceling an order from the order list screen, pressing [cancel action] will return to the order list screen.
If Canceling an order from the order detail screen, clicking [cancel action] will return to the order detail screen.

CancelOrder.cshtml
<div class="@($"{dependClass}__buttons")">
            @await Component.InvokeAsync("KcButton",
            new ApiButtonModel
            {
                ClassName = "kc-button",
                Text = T("Order.Cancel.Button.Confirm").Text,
                Javascript = $"cancelOrder()",
                Variant = "-medium -right"
            })
            @await Component.InvokeAsync("KcButton",
            new ApiButtonModel
            {
                ClassName = "kc-button",
                Text = T("Order.Cancel.Button.Cancel").Text,
                Javascript = $"setLocation('/orderdetails/{Model.OrderId}')",
                Variant = "-medium -left"
            })
        </div>