mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-02 02:31:53 +02:00
Make links even shorter
This commit is contained in:
parent
0557cafdda
commit
aefc7cc298
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ export const truncateLink = (href: string, text: string, key: number) => {
|
|||
const beginningOfPath = textWithoutProtocol.indexOf("/");
|
||||
let finalText = textWithoutProtocol;
|
||||
if (beginningOfPath !== -1) {
|
||||
finalText = textWithoutProtocol.substring(0, beginningOfPath + 30);
|
||||
finalText = textWithoutProtocol.substring(0, beginningOfPath + 15);
|
||||
}
|
||||
if (finalText.length === textWithoutProtocol.length) {
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue