Skip to content

Commit

Permalink
✨ Add Property for Mastodon Profile URL
Browse files Browse the repository at this point in the history
  • Loading branch information
0x46616c6b committed Nov 12, 2023
1 parent 9c132b4 commit 0a0984b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const About: FC<Props> = ({ isModal }) => {
{ticker.information.twitter && <DescriptionItem info={ticker.information.twitter} type={DescriptionTypes.Twitter} />}
{ticker.information.facebook && <DescriptionItem info={ticker.information.facebook} type={DescriptionTypes.Facebook} />}
{ticker.information.telegram && <DescriptionItem info={ticker.information.telegram} type={DescriptionTypes.Telegram} />}
{ticker.information.mastodon && <DescriptionItem info={ticker.information.mastodon} type={DescriptionTypes.Mastodon} />}
<List.Item>
<List.Icon name="feed" />
<List.Content>
Expand Down
11 changes: 11 additions & 0 deletions src/components/DescriptionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ const DescriptionItem: FC<Props> = props => {
</List.Content>
</List.Item>
)
case DescriptionTypes.Mastodon:
return (
<List.Item>
<List.Icon name="linkify" />
<List.Content>
<a href={`${props.info}`} rel="noopener noreferrer" target="_blank">
{props.info.replace('https://', '')}
</a>
</List.Content>
</List.Item>
)
default:
return null
}
Expand Down
2 changes: 2 additions & 0 deletions src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type TickerInformation = {
telegram: string
twitter: string
url: string
mastodon: string
}

export type Settings = {
Expand All @@ -38,6 +39,7 @@ export enum DescriptionTypes {
Homepage = 'HOMEPAGE',
Twitter = 'TWITTER',
Telegram = 'TELEGRAM',
Mastodon = 'MASTODON',
}

export type Message = {
Expand Down

0 comments on commit 0a0984b

Please sign in to comment.