Skip to content

Commit 534ac4b

Browse files
committed
Hide source repo if not exist
Signed-off-by: Trung Nguyen <[email protected]>
1 parent a689547 commit 534ac4b

File tree

1 file changed

+13
-11
lines changed
  • src/extension/ui/src/components/tile

1 file changed

+13
-11
lines changed

src/extension/ui/src/components/tile/Modal.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -195,17 +195,19 @@ const ConfigurationModal = ({
195195
>
196196
{catalogItem.description}
197197
</Typography>
198-
<Typography variant="body2" sx={{ mt: 2, color: 'text.secondary' }}>
199-
Repository:{' '}
200-
<Link
201-
onClick={() => client.host.openExternal(catalogItem.source || '')}
202-
href={catalogItem.source || ''}
203-
target="_blank"
204-
>
205-
{catalogItem.source || ''}
206-
<Launch />
207-
</Link>
208-
</Typography>
198+
{catalogItem.source !== undefined && (
199+
<Typography variant="body2" sx={{ mt: 2, color: 'text.secondary' }}>
200+
Repository:{' '}
201+
<Link
202+
onClick={() => client.host.openExternal(catalogItem.source || '')}
203+
href={catalogItem.source || ''}
204+
target="_blank"
205+
>
206+
{catalogItem.source || ''}
207+
<Launch />
208+
</Link>
209+
</Typography>
210+
)}
209211

210212
{configLoading ? (
211213
<Box sx={{ display: 'flex', justifyContent: 'center', p: 2 }}>

0 commit comments

Comments
 (0)