kgroad-frontend2/src/widgets/home/RatingSection/helpers.ts

14 lines
310 B
TypeScript

export const sliceLocation = (location: string) => {
if (location.length > 15) return `${location.slice(0, 15)}...`;
return location;
};
export const sliceDescription = (description: string) => {
if (description.length > 49) {
return `${description.slice(0, 50)}...`;
}
return description;
};