Skip to content

Commit

Permalink
Remove old pointers to cdli, oracc
Browse files Browse the repository at this point in the history
  • Loading branch information
fsimonjetz committed Oct 27, 2023
1 parent fdf7e20 commit 9982f86
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions src/fragmentarium/ui/info/Details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react'

import _ from 'lodash'
import { Fragment, Script } from 'fragmentarium/domain/fragment'
import CdliLink from './CdliLink'
import FragmentLink from 'fragmentarium/ui/FragmentLink'
import ExternalLink from 'common/ExternalLink'
import './Details.css'
Expand Down Expand Up @@ -82,47 +81,6 @@ function Measurements({ fragment: { measures } }: Props): JSX.Element {
return <>{_.isEmpty(measurements) ? '' : `${measurements} cm`}</>
}

function CdliNumber({ fragment: { cdliNumber } }: Props): JSX.Element {
return (
<>
CDLI:{' '}
{cdliNumber ? (
<CdliLink cdliNumber={cdliNumber}>{cdliNumber}</CdliLink>
) : (
'-'
)}
</>
)
}

function EditedInOraccProject({
fragment: { editedInOraccProject, cdliNumber },
}: Props): JSX.Element {
const encodedCdliNumber = encodeURIComponent(cdliNumber)
const projectLink =
editedInOraccProject == 'ccp'
? `https://ccp.yale.edu/${encodedCdliNumber}`
: `http://oracc.org/${encodeURIComponent(
editedInOraccProject.toLowerCase()
)}/${encodedCdliNumber}`
return (
<>
{editedInOraccProject && (
<>
Oracc Edition:{' '}
<ExternalLink
href={projectLink}
aria-label={`Oracc text ${cdliNumber}`}
className={'text-dark'}
>
{editedInOraccProject} <i className="fas fa-external-link-alt" />
</ExternalLink>
</>
)}
</>
)
}

function Accession({ fragment }: Props): JSX.Element {
return <>Accession: {fragment.accession || '-'}</>
}
Expand Down Expand Up @@ -160,12 +118,6 @@ function Details({
<li className="Details__item Details-item--extra-margin">
<Measurements fragment={fragment} />
</li>
<li className="Details__item">
<CdliNumber fragment={fragment} />
</li>
<li className="Details__item">
<EditedInOraccProject fragment={fragment} />
</li>
<li className="Details__item">
<Accession fragment={fragment} />
</li>
Expand Down

0 comments on commit 9982f86

Please sign in to comment.