feat(frontend): log a pool view when the pool page opens
Fire POST /pools/{id}/views fire-and-forget after the pool loads, the
same way the file viewer logs file views.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -86,6 +86,9 @@
|
|||||||
notes = p.notes ?? '';
|
notes = p.notes ?? '';
|
||||||
isPublic = p.is_public ?? false;
|
isPublic = p.is_public ?? false;
|
||||||
loaded = true;
|
loaded = true;
|
||||||
|
// Log the view (activity.pool_views). Fire-and-forget — never block or
|
||||||
|
// fail the page over view tracking.
|
||||||
|
void api.post(`/pools/${id}/views`).catch(() => {});
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
loadError = e instanceof ApiError ? e.message : 'Failed to load pool';
|
loadError = e instanceof ApiError ? e.message : 'Failed to load pool';
|
||||||
|
|||||||
Reference in New Issue
Block a user