Skip to content

Commit

Permalink
Merge pull request #481 from audioverse-org/AV-518.2-Presenters-with-…
Browse files Browse the repository at this point in the history
…no-images-to-display-First-letter-of-first-and-last-name-Presenter-s-card-on-website-and-mobile-browser

updated cardperson and circleInitials
  • Loading branch information
avorg authored Oct 5, 2023
2 parents fd12925 + 0ce7c3c commit e50cdc4
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/molecules/card/favoriteEntity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function CardFavoriteEntity({
case 'Collection':
return <CardCollection collection={entity} />;
case 'Person':
return <CardPerson person={entity} />;
return <CardPerson person={entity} midinit={true} />;
case 'Recording':
return <CardRecording recording={entity} />;
case 'Sequence':
Expand Down
4 changes: 3 additions & 1 deletion src/components/molecules/card/inferred.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ const Typename = {
export default function CardInferred({ entity }: { entity: InferrableEntity }) {
switch (entity.__typename) {
case Typename.Person:
return <CardPerson person={entity as CardPersonFragment} />;
return (
<CardPerson person={entity as CardPersonFragment} midinit={true} />
);
case Typename.Recording:
return <CardRecording recording={entity as CardRecordingFragment} />;
case Typename.Sequence:
Expand Down
13 changes: 12 additions & 1 deletion src/components/molecules/card/person.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ import styles from './person.module.scss';
interface CardCollectionProps {
person: CardPersonFragment;
compact?: boolean;
largeinit?: boolean;
midinit?: boolean;
smallinit?: boolean;
}

export default function CardPerson({
person,
compact = false,
largeinit = false,
midinit = false,
smallinit = false,
}: CardCollectionProps): JSX.Element {
const { isFavorited, toggleFavorited } = useIsPersonFavorited(person.id);
const { canonicalPath, image, name, recordings } = person;
Expand All @@ -39,7 +45,12 @@ export default function CardPerson({
<RoundImage image={image.url} alt={name} large={compact} />
</div>
) : (
<CircleInitials name={name} large={true} />
<CircleInitials
name={name}
large={largeinit}
mid={midinit}
small={smallinit}
/>
)}
{name}
</Heading2>
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/cardSlider/section/presenters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function Presenters(props: {
})}
seeAllUrl={root.lang(lang).presenters.get()}
Card={(p: { node: CardPersonFragment }) => (
<CardPerson person={p.node} compact />
<CardPerson person={p.node} compact largeinit={true} />
)}
/>
);
Expand Down
2 changes: 1 addition & 1 deletion src/containers/collection/presenters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function CollectionPresenters({
</LineHeading>
<CardGroup>
{nodes.map((node) => (
<CardPerson person={node} key={node.canonicalPath} />
<CardPerson person={node} key={node.canonicalPath} midinit={true} />
))}
</CardGroup>
<Pagination
Expand Down

1 comment on commit e50cdc4

@vercel
Copy link

@vercel vercel bot commented on e50cdc4 Oct 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.