Adding Link To ResourceList Item in Shopify

134 Views Asked by At

I have created Shopify App for Testing purpose.

enter image description here

As shown in the above image, i have shown products in Resource List.

    const productItems = useMemo( () => {
    return products.map(
        ({ id, title, featuredImage }) => ({
            id,
            title:title,
            url:`products/${extractIdFromGid(id)}`,
            icon: <Thumbnail size="small" source={featuredImage?.originalSrc || ImageMajor}/>
        })
    );
}, [products] );

Each Resource List Item has URL link to custom product detail page.

export function extractIdFromGid(gid) {
return gid.split("/").pop();}

But the URL redirection not working?

0

There are 0 best solutions below