Use new grid cards

This commit is contained in:
Jackson Harper 2023-02-27 14:54:48 +08:00
parent 8e11b26d69
commit c14550f14f
2 changed files with 6 additions and 6 deletions

View file

@ -3,6 +3,7 @@ import { ListLinkedItemCard } from './ListLinkedItemCard'
import type { LinkedItemCardProps } from './CardTypes'
import { HighlightItemCard } from './HighlightItemCard'
import { PageType } from '../../../lib/networking/fragments/articleFragment'
import { LibraryGridCard } from './LibraryGridCard'
const shouldHideUrl = (url: string): boolean => {
try {
@ -41,6 +42,6 @@ export function LinkedItemCard(props: LinkedItemCardProps): JSX.Element {
if (props.layout == 'LIST_LAYOUT') {
return <ListLinkedItemCard {...props} originText={originText} />
} else {
return <GridLinkedItemCard {...props} originText={originText} />
return <LibraryGridCard {...props} originText={originText} />
}
}

View file

@ -98,9 +98,8 @@ export function HomeFeedContainer(): JSX.Element {
const gridContainerRef = useRef<HTMLDivElement>(null)
const [labelsTarget, setLabelsTarget] = useState<LibraryItem | undefined>(
undefined
)
const [labelsTarget, setLabelsTarget] =
useState<LibraryItem | undefined>(undefined)
const [showAddLinkModal, setShowAddLinkModal] = useState(false)
const [showEditTitleModal, setShowEditTitleModal] = useState(false)
@ -814,7 +813,7 @@ function HomeFeedGrid(props: HomeFeedContentProps): JSX.Element {
}) => (
<div
{...getRootProps({ className: 'dropzone' })}
style={{ width: '100%', height: '100%' }}
style={{ height: '100%' }}
>
{inDragOperation && uploadingFiles.length < 1 && (
<DragnDropContainer>
@ -883,7 +882,7 @@ function HomeFeedGrid(props: HomeFeedContentProps): JSX.Element {
width: '100%',
gridAutoRows: 'auto',
borderRadius: '8px',
gridGap: layout == 'LIST_LAYOUT' ? '0' : '$3',
gridGap: layout == 'LIST_LAYOUT' ? '0' : '20px',
marginTop: layout == 'LIST_LAYOUT' ? '21px' : '0',
marginBottom: '0px',
paddingTop: layout == 'LIST_LAYOUT' ? '0' : '21px',