Skip to content

Commit

Permalink
Merge branch 'feature/pwa' of github.com:greenpill-dev-guild/green-go…
Browse files Browse the repository at this point in the history
…ods into develop
  • Loading branch information
Oba-One committed Aug 31, 2024
2 parents fc46343 + 7b4e7e7 commit 483faff
Showing 1 changed file with 2 additions and 39 deletions.
41 changes: 2 additions & 39 deletions packages/client/src/utils/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export function isValidEmail(email: string) {
}

export function truncateDescription(description: string) {
return description.length > 80
? description.slice(0, 80 - 1) + "..."
return description.length > 80 ?
description.slice(0, 80 - 1) + "..."
: description;
}

Expand Down Expand Up @@ -58,40 +58,3 @@ export function formatLastUpdated(updatedAt: string) {

return "just now";
}

export function determineSocialMedia(link: string) {
if (link.includes("https://twitter.com") || link.includes(" https://x.com"))
return {
icon: "/icons/x.svg",
label: "X",
};

if (link.includes("https://warpcast.com"))
return {
icon: "/icons/farcaster.svg",
label: "farcaster",
};

if (link.includes("https://mirror.xyz"))
return {
icon: "/icons/mirror.svg",
label: "mirror",
};

if (link.includes("https://discord.com"))
return {
icon: "/icons/discord.svg",
label: "discord",
};

if (link.includes("https://t.me"))
return {
icon: "/icons/telegram.svg",
label: "telegram",
};

return {
icon: "/icons/globe-alt.svg",
label: "link",
};
}

0 comments on commit 483faff

Please sign in to comment.