diff --git a/library/package.json b/library/package.json index ed9ec2ef0..e59cbcaf8 100644 --- a/library/package.json +++ b/library/package.json @@ -119,4 +119,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/library/src/components/Extensions.tsx b/library/src/components/Extensions.tsx index 5905e446c..a9902622c 100644 --- a/library/src/components/Extensions.tsx +++ b/library/src/components/Extensions.tsx @@ -55,23 +55,35 @@ export const Extensions: React.FunctionComponent = ({
+ {/* map supported extensions */} +
+ {Object.keys(extensions) + .sort((extension1, extension2) => + extension1.localeCompare(extension2), + ) + .map((extensionKey) => { + if (config.extensions?.[extensionKey]) { + const CustomExtensionComponent = + config.extensions[extensionKey]; + return ( + + ); + } else return null; + })} +
+ {/* map other extensions */} {Object.keys(extensions) .sort((extension1, extension2) => extension1.localeCompare(extension2), ) .map((extensionKey) => { - if (config.extensions?.[extensionKey]) { - const CustomExtensionComponent = config.extensions[extensionKey]; - return ( - - ); - } else { + if (!config.extensions?.[extensionKey]) { const extensionSchema = SchemaHelpers.jsonToSchema( extensions[extensionKey], ); @@ -80,7 +92,7 @@ export const Extensions: React.FunctionComponent = ({
); - } + } else return null; })} diff --git a/library/src/components/supportedExtensions/LinkedinExtension.tsx b/library/src/components/supportedExtensions/LinkedinExtension.tsx new file mode 100644 index 000000000..59fd02d9d --- /dev/null +++ b/library/src/components/supportedExtensions/LinkedinExtension.tsx @@ -0,0 +1,35 @@ +import React from 'react'; + +import { ExtensionComponentProps } from '../../types'; + +/** + * See . + */ +export default function LinkedinExtension({ + propertyValue, +}: ExtensionComponentProps) { + return ( + + + + + + ); +} diff --git a/library/src/components/supportedExtensions/XExtension.tsx b/library/src/components/supportedExtensions/XExtension.tsx index 5089eba32..ce654ee7a 100644 --- a/library/src/components/supportedExtensions/XExtension.tsx +++ b/library/src/components/supportedExtensions/XExtension.tsx @@ -17,7 +17,6 @@ export default function XExtension({ target="_blank" >