Fix share tag formatting
This commit is contained in:
parent
808ae9437b
commit
2408e7d30a
@ -4,7 +4,7 @@ import ImageCaption from './components/ImageCaption';
|
||||
import ImagePhotoGrid from './components/ImagePhotoGrid';
|
||||
import ImageContainer from './components/ImageContainer';
|
||||
import type { NextImageSize } from '@/services/next-image';
|
||||
import { isTagFavs } from '@/tag';
|
||||
import { formatTag, isTagFavs } from '@/tag';
|
||||
|
||||
export default function TagImageResponse({
|
||||
tag,
|
||||
@ -43,18 +43,18 @@ export default function TagImageResponse({
|
||||
transform: `translateY(${height * .0095}px)`,
|
||||
// Fix horizontal distortion in icon size
|
||||
width: height * .076,
|
||||
marginRight: height * .01,
|
||||
marginRight: height * .015,
|
||||
}}
|
||||
/>
|
||||
: <FaTag
|
||||
size={height * .06}
|
||||
style={{
|
||||
transform: `translateY(${height * .016}px)`,
|
||||
marginRight: height * .015,
|
||||
marginRight: height * .02,
|
||||
}}
|
||||
/>,
|
||||
}}>
|
||||
{tag.toLocaleUpperCase()}
|
||||
{formatTag(tag).toLocaleUpperCase()}
|
||||
</ImageCaption>
|
||||
</ImageContainer>
|
||||
);
|
||||
|
||||
@ -36,7 +36,7 @@ export const titleForTag = (
|
||||
].join(' ');
|
||||
|
||||
export const shareTextForTag = (tag: string) =>
|
||||
isTagFavs(tag) ? 'Favorite photos' : `Photos tagged '${tag}'`;
|
||||
isTagFavs(tag) ? 'Favorite photos' : `Photos tagged '${formatTag(tag)}'`;
|
||||
|
||||
export const sortTags = (
|
||||
tags: string[],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user