feat: recreate shared page

+ improve security by not exposing author's email
This commit is contained in:
Sonny
2024-11-09 02:25:44 +01:00
committed by Sonny
parent 798ff0fbe4
commit 83c1966946
17 changed files with 181 additions and 72 deletions

View File

@@ -0,0 +1,24 @@
import { Stack } from '@mantine/core';
import { LinkItem } from '~/components/dashboard/link/item/link_item';
import { NoLink } from '~/components/dashboard/link/no_link/no_link';
import { useActiveCollection } from '~/stores/collection_store';
export interface LinkListProps {
hideMenu?: boolean;
}
export function LinkList({ hideMenu = false }: LinkListProps) {
const { activeCollection } = useActiveCollection();
if (!activeCollection?.links || activeCollection.links.length === 0) {
return <NoLink hideMenu={hideMenu} />;
}
return (
<Stack gap="xs">
{activeCollection?.links.map((link) => (
<LinkItem link={link} key={link.id} hideMenu={hideMenu} />
))}
</Stack>
);
}