I am new to React and Typescript. I have a page that sends such URL to another one thru GET as below
http://localhost:8080/merchant-partner/0d593974-ff15-4650-a66b-76df7b701faf
As you can see, the URL parameter is based on an UUID String.
I use this UUID parameter to another page
Its code is based on below
export interface IMerchantPartnerProps extends StateProps, DispatchProps, RouteComponentProps<{ merchantId: string }> {}
export const MerchantPartner = (props: IMerchantPartnerProps) => {
useEffect(() => {
props.getEntities(Number(props.match.params.merchantId);
}, []);
I try to convert this UUID String to Typescript Number, but I get a NaN. How can I convert that?