mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 22:53:25 +00:00
fix: hide collection edit link only when activeCollection isnt defined
This commit is contained in:
@@ -40,13 +40,12 @@ export default function Dashboard() {
|
|||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Group>
|
<Group>
|
||||||
{!isFavorite &&
|
{activeCollection?.visibility === Visibility.PUBLIC && (
|
||||||
activeCollection?.visibility === Visibility.PUBLIC && (
|
<>
|
||||||
<>
|
<SharedCollectionCopyLink />
|
||||||
<SharedCollectionCopyLink />
|
<Divider orientation="vertical" />
|
||||||
<Divider orientation="vertical" />
|
</>
|
||||||
</>
|
)}
|
||||||
)}
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
@@ -73,22 +72,20 @@ export default function Dashboard() {
|
|||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{!isFavorite && (
|
<>
|
||||||
<>
|
<Divider orientation="vertical" />
|
||||||
<Divider orientation="vertical" />
|
<Button
|
||||||
<Button
|
variant="light"
|
||||||
variant="light"
|
component={Link}
|
||||||
component={Link}
|
href={appendCollectionId(
|
||||||
href={appendCollectionId(
|
route('link.create-form').path,
|
||||||
route('link.create-form').path,
|
activeCollection?.id
|
||||||
activeCollection?.id
|
)}
|
||||||
)}
|
size="xs"
|
||||||
size="xs"
|
>
|
||||||
>
|
{t('link.create')}
|
||||||
{t('link.create')}
|
</Button>
|
||||||
</Button>
|
</>
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
{displayPreferences.collectionListDisplay === 'inline' && !isMobile && (
|
{displayPreferences.collectionListDisplay === 'inline' && !isMobile && (
|
||||||
|
|||||||
Reference in New Issue
Block a user