Add support for some specific placeholders for correct social urls
This commit is contained in:
@@ -42,6 +42,11 @@ export default function EditSocialLinks() {
|
|||||||
|
|
||||||
let resetTimer = null;
|
let resetTimer = null;
|
||||||
|
|
||||||
|
const PLACEHOLDERS = {
|
||||||
|
'mastodon': 'https://mastodon.social/@username',
|
||||||
|
'twitter': 'https://twitter.com/username'
|
||||||
|
}
|
||||||
|
|
||||||
const getAvailableIcons = async () => {
|
const getAvailableIcons = async () => {
|
||||||
try {
|
try {
|
||||||
const result = await fetchData(SOCIAL_PLATFORMS_LIST, { auth: false });
|
const result = await fetchData(SOCIAL_PLATFORMS_LIST, { auth: false });
|
||||||
@@ -267,7 +272,7 @@ export default function EditSocialLinks() {
|
|||||||
<TextField
|
<TextField
|
||||||
fieldName="social-url"
|
fieldName="social-url"
|
||||||
label="URL"
|
label="URL"
|
||||||
placeholder="Url to page"
|
placeholder={PLACEHOLDERS[modalDataState.platform] || 'Url to page'}
|
||||||
value={modalDataState.url}
|
value={modalDataState.url}
|
||||||
onChange={handleUrlChange}
|
onChange={handleUrlChange}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user