#
isNavigationLink
Indicate whether or not a navigation item should be rendered as a link. This utility is particularly handy when rendering a menu with nested items.
#
Reference
const isLink = isNavigationLink(item)
#
Parameters
item
: A navigation item rendering props.
#
Returns
A boolean value indicating whether or not the navigation item should be rendered as a link.
#
Usage
import { isNavigationLink, type RenderItemFunction } from "@squide/firefly";
const renderItem: RenderItemFunction = item => {
return isNavigationLink(item) ? renderLinkItem(item) : renderSectionItem(item);
};