Add comment to useFollowReference

This commit is contained in:
diondiondion
2026-09-11 17:08:46 +02:00
parent 8014d03165
commit 28277fc041

View File

@@ -2,6 +2,14 @@ import { useLocation } from 'react-router-dom';
import type { LocationState } from '../components/router';
/**
* Gets the current `reference` state from location state if present,
* otherwise returns the passed-in fallback reference.
*
* `reference` is a string that we use to anonymously & locally track
* where a follow is coming from, helping us understand which UI features
* people actually use to discover people.
*/
export function useFollowReference(fallbackReference: string) {
const { state } = useLocation<LocationState>();