useBuildIntentUrl
#
DescriptionHook to use the urlBuilder
of the intentBuilder
.
#
Usageimport { Discount } from '@springtree/eva-suite-uri-parser';import { useBuildIntentUrl } from '@springtree/eva-suite-react-hooks';
interface IExampleProps { discountId: number;}
const Example = ({ discountId }: IExampleProps) => { const discountViewDetailsUrl = useBuildIntentUrl(Discount.View, 'DISCOUNTS', { discountId });
return url ? ( <a href={discountViewDetailsUrl} target="_blank" rel="noreferrer">{discountId}</a> ) : ( <>{discountId}</> );};
export default Example;