Skip to content

Commit

Permalink
Use standalone type for Link
Browse files Browse the repository at this point in the history
  • Loading branch information
dgcohen committed Dec 11, 2023
1 parent 880b924 commit d909e81
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
6 changes: 5 additions & 1 deletion src/components/RCLink/RCLink.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { Link as DSLink } from "@nypl/design-system-react-components"
import {
Link as DSLink,
type LinkTypes,
} from "@nypl/design-system-react-components"
import Link from "next/link"
import { type ReactNode } from "react"

Expand All @@ -8,6 +11,7 @@ interface RCLinkProps {
children: ReactNode
className?: string
color?: string
type?: LinkTypes
}

/**
Expand Down
18 changes: 2 additions & 16 deletions src/components/SearchResult/SearchResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
Box,
Text,
CardActions,
Icon,
} from "@nypl/design-system-react-components"

import RCLink from "../RCLink/RCLink"
Expand Down Expand Up @@ -40,21 +39,8 @@ const SearchResult = ({ bib }: SearchResultProps) => {
{/* Move the code block below to the conditional for rendering the Item Table */}
{bib.numPhysicalItems > ITEMS_PER_SEARCH_RESULT && (
<CardActions>
<RCLink href={`${bib.url}#items-table`}>
<Text
isBold
size="body1"
noSpace
sx={{ display: "flex", alignItems: "center" }}
>
{`View All ${bib.itemMessage} `}
<Icon
iconRotation="rotate270"
name="arrow"
size="xsmall"
ml="xxs"
/>
</Text>
<RCLink href={`${bib.url}#items-table`} type="standalone">
{`View All ${bib.itemMessage} `}
</RCLink>
</CardActions>
)}
Expand Down

0 comments on commit d909e81

Please sign in to comment.