forked from Transparency/kgroad-frontend2
14 lines
310 B
TypeScript
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;
|
|
};
|