Skip to content

Commit e19d0b1

Browse files
committed
Linkless socials fix
- Fixed linkless socials (socials that have no link template associated) show value instead of type on site
1 parent daeddba commit e19d0b1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/components/menu/body/social.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@ const formatEntry = (type: string, ...data: string[]): { text: string, onClick:
2222
}
2323

2424
const link = LINKS.get(type)
25-
if (!link) return {
26-
text: typeToReadable(type),
27-
onClick: () => {
25+
return {
26+
text: data[0],
27+
onClick: link ? `https://${link}/${data[0]}` : () => {
2828
navigator.clipboard.writeText(data[0])
2929
alert("Copied!")
3030
}
3131
}
32-
return { text: data[0], onClick: `https://${link}/${data[0]}` }
3332
}
3433

3534
export const SOCIALS: Record<string, string | string[]> = {

0 commit comments

Comments
 (0)