Commit 6fc7ec1a authored by Max Alekseenko's avatar Max Alekseenko

cut the link url

parent 289a6936
...@@ -98,6 +98,12 @@ const MarketplaceAppModal = ({ ...@@ -98,6 +98,12 @@ const MarketplaceAppModal = ({
const isMobile = useIsMobile(); const isMobile = useIsMobile();
const logoUrl = useColorModeValue(logo, logoDarkMode || logo); const logoUrl = useColorModeValue(logo, logoDarkMode || logo);
function getHostname(url: string | undefined) {
try {
return new URL(url || '').hostname;
} catch (err) {}
}
return ( return (
<Modal <Modal
isOpen={ Boolean(data.id) } isOpen={ Boolean(data.id) }
...@@ -260,7 +266,7 @@ const MarketplaceAppModal = ({ ...@@ -260,7 +266,7 @@ const MarketplaceAppModal = ({
overflow="hidden" overflow="hidden"
textOverflow="ellipsis" textOverflow="ellipsis"
> >
{ site } { getHostname(site) }
</Text> </Text>
</Link> </Link>
) } ) }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment