Remove unused

This commit is contained in:
Jackson Harper
2023-03-08 17:05:42 +08:00
parent c9d48c5f35
commit e9b4cdd7bf
3 changed files with 1 additions and 103 deletions

View File

@ -1,96 +0,0 @@
import { styled } from '@stitches/react'
import { Fragment, useMemo } from 'react'
import { LabelChip } from '../../elements/LabelChip'
import {
VStack,
HStack,
Blockquote,
SpanBox,
Box,
} from '../../elements/LayoutPrimitives'
import { StyledMark, StyledText } from '../../elements/StyledText'
import { HighlightView } from '../HighlightView'
import { LinkedItemCardAction, LinkedItemCardProps } from './CardTypes'
import { TitleStyle } from './LibraryCardStyles'
export interface HighlightItemCardProps
extends Pick<LinkedItemCardProps, 'item'> {
handleAction: (action: LinkedItemCardAction) => void
}
export const PreviewImage = styled('img', {
objectFit: 'cover',
cursor: 'pointer',
})
const StyledQuote = styled(Blockquote, {
margin: '0px 0px 0px 0px',
fontSize: '16px',
lineHeight: '27px',
color: '$grayText',
paddingLeft: '20px',
// borderRadius: '8px',
borderLeft: '2px solid $omnivoreCtaYellow',
})
export function HighlightItemCard(props: HighlightItemCardProps): JSX.Element {
const lines = useMemo(() => props.item.quote.split('\n'), [props.item.quote])
return (
<VStack
css={{
p: '20px',
gap: '20px',
height: '100%',
width: '320px',
borderRadius: '8px',
cursor: 'pointer',
wordBreak: 'break-word',
overflow: 'clip',
border: '1px solid $thBorderColor',
borderBottom: 'none',
boxShadow: '0px 3px 11px rgba(32, 31, 29, 0.04)',
bg: '$grayBg',
'&:focus': {
bg: '$grayBgActive',
},
'&:hover': {
bg: '$grayBgActive',
},
}}
alignment="start"
distribution="start"
onClick={() => {
props.handleAction('showDetail')
}}
>
<Box
css={{
...TitleStyle,
height: '42px',
}}
>
{props.item.title}
</Box>
<StyledQuote>
<SpanBox css={{ p: '1px', borderRadius: '2px' }}>
{lines.map((line: string, index: number) => (
<Fragment key={index}>
{line}
{index !== lines.length - 1 && (
<>
<br />
<br />
</>
)}
</Fragment>
))}
</SpanBox>
<Box css={{ display: 'block', pt: '16px' }}>
{props.item.labels?.map(({ name, color }, index) => (
<LabelChip key={index} text={name || ''} color={color} />
))}
</Box>
</StyledQuote>
</VStack>
)
}

View File

@ -17,7 +17,6 @@ import {
libraryListCommands,
highlightBarKeyboardCommands,
} from '../../lib/keyboardShortcuts/navigationShortcuts'
import { useRouter } from 'next/router'
type KeyboardShortcutListModalProps = {
onOpenChange: (open: boolean) => void
@ -26,8 +25,6 @@ type KeyboardShortcutListModalProps = {
export function KeyboardShortcutListModal(
props: KeyboardShortcutListModalProps
): JSX.Element {
const router = useRouter()
return (
<ModalRoot defaultOpen onOpenChange={props.onOpenChange}>
<ModalOverlay />

View File

@ -4,10 +4,7 @@ import { DotsThreeVertical } from 'phosphor-react'
import { Fragment, useMemo, useState } from 'react'
import { Highlight } from '../../../lib/networking/fragments/highlightFragment'
import { Label } from '../../../lib/networking/fragments/labelFragment'
import {
LibraryItem,
LibraryItemNode,
} from '../../../lib/networking/queries/useGetLibraryItemsQuery'
import { LibraryItemNode } from '../../../lib/networking/queries/useGetLibraryItemsQuery'
import { UserBasicData } from '../../../lib/networking/queries/useGetViewerQuery'
import { Dropdown, DropdownOption } from '../../elements/DropdownElements'
import { LabelChip } from '../../elements/LabelChip'