const handleLinkClick = (index: number) => () => {
const hasUrl = !!searchItems[index]?.url;
if (hasUrl) {
navigateToLink(searchItems[index]?.url);
} else {
setItemSelected(index);
}
};
However, the issue I encountered is:
(property) url?: string | undefined
Argument of type 'string | undefined' is not assignable to parameter of type 'Url'.
Type 'undefined' is not assignable to type 'Url'.