bellini/ts_catalog/helpers/articlehelpers.ts

7 lines
294 B
TypeScript
Raw Normal View History

2025-02-03 11:31:40 +01:00
import * as belliniApi from '@bellini/api';
export const getArticleUrl = (articleArg: belliniApi.IBelliniClientState['articles'][0]) => {
const articleUrl = `/article/${articleArg.belliniId}/${encodeURIComponent(articleArg.title.toLowerCase().replace(/\s/g, '-'))}`;
return articleUrl;
};