mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-10 07:25:35 +00:00
feat: use link action dropdown for favorite links
This commit is contained in:
@@ -1,25 +1,23 @@
|
||||
import { Card, Group, Text } from '@mantine/core'; // Import de Mantine
|
||||
import { Card, Group, Text } from '@mantine/core';
|
||||
import { ExternalLinkStyled } from '~/components/common/external_link_styled';
|
||||
import LinkControls from '~/components/dashboard/link/link_controls';
|
||||
import LinkFavicon from '~/components/dashboard/link/link_favicon';
|
||||
import { LinkWithCollection } from '~/types/app';
|
||||
import styles from './favorite_item.module.css';
|
||||
|
||||
export const FavoriteItem = ({
|
||||
link: { name, url, collection },
|
||||
}: {
|
||||
link: LinkWithCollection;
|
||||
}) => (
|
||||
export const FavoriteItem = ({ link }: { link: LinkWithCollection }) => (
|
||||
<Card className={styles.linkWrapper} radius="sm" withBorder>
|
||||
<Group justify="center" gap="xs">
|
||||
<LinkFavicon size={32} url={url} />
|
||||
<ExternalLinkStyled href={url} style={{ flex: 1 }}>
|
||||
<LinkFavicon size={32} url={link.url} />
|
||||
<ExternalLinkStyled href={link.url} style={{ flex: 1 }}>
|
||||
<div className={styles.linkName}>
|
||||
<Text lineClamp={1}>{name} </Text>
|
||||
<Text lineClamp={1}>{link.name} </Text>
|
||||
</div>
|
||||
<Text c="gray" size="xs" lineClamp={1}>
|
||||
{collection.name}
|
||||
<Text c="gray" size="xs" mb={4} lineClamp={1}>
|
||||
{link.collection.name}
|
||||
</Text>
|
||||
</ExternalLinkStyled>
|
||||
<LinkControls link={link} showGoToCollection />
|
||||
</Group>
|
||||
</Card>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user