Skip to content

Commit 64eaca0

Browse files
authored
feat: add photos_count support for markers and icons (#1326)
- **DB Service**: Upgrade indexedDB version to 8. - **Hooks**: Enhance `useRenderedMarkers` to utilize `photos_count` for marker sprites. - **Icons**: Update SVG templates to include a camera icon conditional on `photos_count` value.
1 parent 64007d3 commit 64eaca0

File tree

3 files changed

+201
-6
lines changed

3 files changed

+201
-6
lines changed

src/hooks/worksite/useRenderedMarkers.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export default (
6767
sprite.svi = marker.svi;
6868
sprite.work_types = marker.work_types;
6969
sprite.updated_at = marker.updated_at;
70+
sprite.photos_count = marker.photos_count;
7071
sprite.flags = marker.flags || [];
7172
sprite.favorite_id = marker.favorite_id;
7273
sprite.updated_at_moment = moment(marker.updated_at);
@@ -137,6 +138,10 @@ export default (
137138
.replaceAll(
138139
'{{multiple}}',
139140
sprite.work_types.length > 1 ? templates.plus : '',
141+
)
142+
.replaceAll(
143+
'{{camera}}',
144+
sprite.photos_count > 0 ? templates.camera : '',
140145
);
141146

142147
sprite.basicTexture = texture;

0 commit comments

Comments
 (0)