Migrate guest v2 achievements and refresh share page
This commit is contained in:
@@ -512,10 +512,16 @@ export default function HomeScreen() {
|
||||
likesCount: photo.likesCount,
|
||||
}));
|
||||
}, [currentTask, galleryPhotos]);
|
||||
const openPreviewPhoto = React.useCallback(
|
||||
(photoId: number) => {
|
||||
navigate(buildEventPath(token, `/gallery?photo=${photoId}`));
|
||||
},
|
||||
[navigate, token]
|
||||
);
|
||||
const openTaskPhoto = React.useCallback(
|
||||
(photoId: number) => {
|
||||
if (!currentTask) return;
|
||||
navigate(buildEventPath(token, `/gallery?photoId=${photoId}&task=${currentTask.id}`));
|
||||
navigate(buildEventPath(token, `/gallery?photo=${photoId}&task=${currentTask.id}`));
|
||||
},
|
||||
[currentTask, navigate, token]
|
||||
);
|
||||
@@ -708,18 +714,24 @@ export default function HomeScreen() {
|
||||
}
|
||||
return (
|
||||
<YStack key={tile.id} flexShrink={0} width={140}>
|
||||
<PhotoFrameTile height={110} borderRadius="$bento">
|
||||
<YStack
|
||||
flex={1}
|
||||
width="100%"
|
||||
height="100%"
|
||||
style={{
|
||||
backgroundImage: `url(${tile.imageUrl})`,
|
||||
backgroundSize: 'cover',
|
||||
backgroundPosition: 'center',
|
||||
}}
|
||||
/>
|
||||
</PhotoFrameTile>
|
||||
<Button
|
||||
unstyled
|
||||
onPress={() => openPreviewPhoto(tile.id)}
|
||||
aria-label={t('galleryPage.photo.alt', { id: tile.id, suffix: '' }, `Foto ${tile.id}`)}
|
||||
>
|
||||
<PhotoFrameTile height={110} borderRadius="$bento">
|
||||
<YStack
|
||||
flex={1}
|
||||
width="100%"
|
||||
height="100%"
|
||||
style={{
|
||||
backgroundImage: `url(${tile.imageUrl})`,
|
||||
backgroundSize: 'cover',
|
||||
backgroundPosition: 'center',
|
||||
}}
|
||||
/>
|
||||
</PhotoFrameTile>
|
||||
</Button>
|
||||
</YStack>
|
||||
);
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user