Migrate guest v2 achievements and refresh share page
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-02-05 16:46:15 +01:00
parent fa630e335d
commit 4e0d156065
22 changed files with 1142 additions and 1902 deletions

View File

@@ -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>
);
})}