diff --git a/packages/web/components/patterns/LibraryCards/LibraryGridCard.tsx b/packages/web/components/patterns/LibraryCards/LibraryGridCard.tsx index b52ebb69e..ccc70ff39 100644 --- a/packages/web/components/patterns/LibraryCards/LibraryGridCard.tsx +++ b/packages/web/components/patterns/LibraryCards/LibraryGridCard.tsx @@ -38,167 +38,189 @@ const cardTitleListStyle = { textAlign: 'left', } +// Props +type CardTitleProps = { + title: string +} + +// Functions +function CardTitle( + props: CardTitleProps, + cardProps: LinkedItemCardProps +): JSX.Element { + return ( + + {props.title} + + ) +} + +// Component export function LibraryGridCard(props: LinkedItemCardProps): JSX.Element { return ( <> - {props.layout !== 'GRID_LAYOUT' ? ( - // { - // props.handleAction('showDetail') - // }} - // > - // {/* {props.item.image && props.layout !== 'LIST_LAYOUT' && ( - // { - // ;(e.target as HTMLElement).style.display = 'none' - // }} - // /> - // )} */} - // - // - // - // { - // // This is here to prevent menu click events from bubbling - // // up and causing us to "click" on the link item. - // e.stopPropagation() - // }} - // > - // - // } - // actionHandler={props.handleAction} - // /> - // - // - // - // - // {props.item.author && ( - // {removeHTMLTags(props.item.author)} - // )} - // {props.originText && ( - // <> - // - // - // {props.originText} - // - // - // )} - // - // - // - // - // - // {props.item.description} - // - // - // - // {props.item.labels?.map(({ name, color }, index) => ( - // - // ))} - // - // - // - 'jjjjjjjjjjjj' + {props.layout === 'GRID_LAYOUT' ? ( + { + props.handleAction('showDetail') + }} + > + {/* {props.item.image && props.layout !== 'LIST_LAYOUT' && ( + { + ;(e.target as HTMLElement).style.display = 'none' + }} + /> + )} */} + + + + { + // This is here to prevent menu click events from bubbling + // up and causing us to "click" on the link item. + e.stopPropagation() + }} + > + + } + actionHandler={props.handleAction} + /> + + + + + {props.item.author && ( + {removeHTMLTags(props.item.author)} + )} + {props.originText && ( + <> + + + {props.originText} + + + )} + + + + + + {props.item.description} + + + + {props.item.labels?.map(({ name, color }, index) => ( + + ))} + + + ) : ( - // )} - - // {props.layout === 'LIST_LAYOUT' && ( - {/* */} {props.item.labels?.map(({ name, color }, index) => ( ))} - {/* */} {props.item.description} @@ -259,89 +279,3 @@ export function LibraryGridCard(props: LinkedItemCardProps): JSX.Element { ) } - -type CardTitleProps = { - title: string -} - -function CardTitle( - props: CardTitleProps, - cardProps: LinkedItemCardProps -): JSX.Element { - return ( - - {props.title} - - ) -} - -// export function LibraryGridCard(props: LinkedItemCardProps): JSX.Element { -// return ( -// -// -// -// -// -// {/* */} -// {props.item.labels?.map(({ name, color }, index) => ( -// -// ))} -// {/* */} -// {props.item.description} -// - -// -// {props.item.author && ( -// {removeHTMLTags(props.item.author)} -// )} -// -// -// -// ) -// } - -// type CardTitleProps = { -// title: string -// } diff --git a/packages/web/components/templates/library/LibraryList.tsx b/packages/web/components/templates/library/LibraryList.tsx index 71c276e98..d7ad55f3c 100644 --- a/packages/web/components/templates/library/LibraryList.tsx +++ b/packages/web/components/templates/library/LibraryList.tsx @@ -83,8 +83,7 @@ export function LibraryList(props: LibraryListProps): JSX.Element { > {viewerData?.me && ( {