Customer-account.order.page.render not working

What is wrong with this

import React, { useState, useEffect } from “react”;
import {
Button,
reactExtension,
useApi,
} from “@shopify/ui-extensions-react/customer-account”;

export default reactExtension(
“customer-account.order.action.menu-item.render”,
() => ,
);

function MenuActionItemExtension() {
const { orderId } = useApi();
const [canCancel, setCanCancel] = useState(true);

< 999 to=“extension:cancel-page-ui/”>Cancel</999> //999==Button
}


[[extensions.targeting]]
module = “./src/CancelButton.jsx”
target = “customer-account.order.action.menu-item.render”

[extensions.capabilities]

Gives your extension access to directly query Shopify’s storefront API.

Configuration

api_access = true

[[extensions]]
type = “ui_extension”
name = “My wishlist”
handle = “cancel-page-ui”

[[extensions.targeting]]
module = “./src/CancelPage.jsx”
target = “customer-account.order.page.render”


when i press cancel it goes to https://shopify.com/9281912/account/pages/ac03cb2f-a033-4d1a-bfcb-96256ac05c9e

but it should go to

https://shopify.com/9281912/account/orders/6179429712162/pages/ac03cb2f-a033-4d1a-bfcb-96256ac05c9e

to work .

am i missing something . i just want to create a cancel page for customer to cancel order

Got the answer

<Button
kind=“primary”
to={extension:cancel-page-ui/customer-account.order.page.render/${orderNumber}}
>
Cancel

Issue with full page extension with order context - Extensions - Shopify Developer Community Forums