Skip to content

Commit

Permalink
revert to original implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
fsimonjetz committed Feb 20, 2024
1 parent a2482b8 commit 7116a3b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/fragmentarium/ui/info/Details.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react'
import { Museums, MuseumKey } from 'fragmentarium/domain/museum'
import _ from 'lodash'
import { Fragment, Script } from 'fragmentarium/domain/fragment'
import FragmentLink from 'fragmentarium/ui/FragmentLink'
Expand All @@ -22,12 +21,7 @@ function Collection({ fragment: { collection } }: Props): JSX.Element {
return <>{collection && `(${collection} Collection)`}</>
}

interface MuseumNameProps {
museumKey: MuseumKey
}

const MuseumName: React.FC<MuseumNameProps> = ({ museumKey }) => {
const museum = Museums[museumKey]
function MuseumName({ fragment: { museum } }: Props): JSX.Element {
return museum.url ? (
<ExternalLink href={museum.url}>{museum.name}</ExternalLink>
) : (
Expand Down Expand Up @@ -128,7 +122,7 @@ function Details({
return (
<ul className="Details">
<li className="Details__item">
<MuseumName museumKey="THE_BRITISH_MUSEUM" />
<MuseumName fragment={fragment} />
</li>
<li className="Details__item">
<Collection fragment={fragment} />
Expand Down

0 comments on commit 7116a3b

Please sign in to comment.