Abbreviate Apple to symbol on core pages

This commit is contained in:
Sam Becker 2023-09-30 10:57:09 -05:00
parent 003328f791
commit e7658eb8a2
2 changed files with 24 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import Link from 'next/link';
import { pathForPhoto, pathForPhotoShare } from '@/site/paths';
import PhotoTags from '@/tag/PhotoTags';
import ShareButton from '@/components/ShareButton';
import PhotoMakeModel from './PhotoMakeModel';
export default function PhotoLarge({
photo,
@ -63,9 +64,7 @@ export default function PhotoLarge({
{tagsToShow.length > 0 &&
<PhotoTags tags={tagsToShow} />}
</div>
<div className="uppercase">
{photo.make} {photo.model}
</div>
<PhotoMakeModel photo={photo} />
</>)}
{renderMiniGrid(<>
<ul className={cc(

View File

@ -0,0 +1,22 @@
import { Photo } from '.';
import { AiFillApple } from 'react-icons/ai';
import { cc } from '@/utility/css';
export default function PhotoMakeModel({
photo,
}: {
photo: Photo
}) {
return (
<div className={cc(
'inline-flex items-center self-start',
'uppercase',
)}>
{photo.make === 'Apple'
? <AiFillApple className="translate-y-[-0.5px]" />
: photo.make}
&nbsp;
{photo.model}
</div>
);
}