Counterparts section design update, touch dnd support, marks scrolling #182

Merged
enes merged 9 commits from 174-add-users-updates into staging 2024-09-06 10:22:56 +00:00
Showing only changes of commit 81f40c345a - Show all commits

View File

@ -1,5 +1,5 @@
/** /**
* Function will replace the middle of the string with 3 dots if length greater then * Function will replace the middle of the string with ellipsis if length greater then
* offset value * offset value
* @param str string to shorten * @param str string to shorten
* @param offset of how many chars to keep in the beginning and the end * @param offset of how many chars to keep in the beginning and the end
@ -9,10 +9,7 @@ export const shorten = (str: string, offset = 9) => {
// return original string if it is not long enough // return original string if it is not long enough
if (str.length < offset * 2 + 4) return str if (str.length < offset * 2 + 4) return str
return `${str.slice(0, offset)}...${str.slice( return `${str.slice(0, offset)}${str.slice(str.length - offset, str.length)}`
str.length - offset,
str.length
)}`
} }
export const stringToHex = (str: string) => { export const stringToHex = (str: string) => {