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 3e91a1a commit 7a5939e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/api/Ticker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface TickerInformation {
twitter: string
facebook: string
telegram: string
mastodon: string
}

export interface TickerTelegram {
Expand Down
20 changes: 19 additions & 1 deletion src/components/ticker/TickerForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MapContainer, Marker, TileLayer } from 'react-leaflet'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { Alert, Button, Checkbox, FormControlLabel, FormGroup, Grid, InputAdornment, Stack, TextField, Typography } from '@mui/material'
import { faComputerMouse, faEnvelope, faUser } from '@fortawesome/free-solid-svg-icons'
import { faFacebook, faTelegram, faTwitter } from '@fortawesome/free-brands-svg-icons'
import { faFacebook, faMastodon, faTelegram, faTwitter } from '@fortawesome/free-brands-svg-icons'

interface Props {
id: string
Expand All @@ -28,6 +28,7 @@ interface FormValues {
twitter: string
facebook: string
telegram: string
mastodon: string
}
location: {
lat: number
Expand All @@ -49,6 +50,7 @@ const TickerForm: FC<Props> = ({ callback, id, ticker }) => {
twitter: ticker?.information.twitter,
facebook: ticker?.information.facebook,
telegram: ticker?.information.telegram,
mastodon: ticker?.information.mastodon,
},
location: {
lat: ticker?.location.lat || 0,
Expand Down Expand Up @@ -224,6 +226,22 @@ const TickerForm: FC<Props> = ({ callback, id, ticker }) => {
/>
</FormGroup>
</Grid>
<Grid item sm={6} xs={12}>
<FormGroup>
<TextField
{...register('information.mastodon')}
InputProps={{
startAdornment: (
<InputAdornment position="start">
<FontAwesomeIcon icon={faMastodon} />
</InputAdornment>
),
}}
label="Mastodon"
margin="dense"
/>
</FormGroup>
</Grid>
<Grid item xs={12}>
<Typography component="h6" variant="h6">
Location
Expand Down

0 comments on commit 7a5939e

Please sign in to comment.