The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
import { AppPath } from 'twenty-shared/types';
import { getAppPath, isDefined } from 'twenty-shared/utils';
import { type NavigationMenuItem } from '~/generated-metadata/graphql';
export const getPageLayoutNavigationMenuItemComputedLink = (
item: Pick<NavigationMenuItem, 'pageLayoutId'>,
): string => {
if (!isDefined(item.pageLayoutId)) {
return '';
}
return getAppPath(AppPath.PageLayoutPage, {
pageLayoutId: item.pageLayoutId,
});
};