diff --git a/app/javascript/mastodon/hooks/useFollowReference.ts b/app/javascript/mastodon/hooks/useFollowReference.ts index e43259a4c5a..d4e72cb47c4 100644 --- a/app/javascript/mastodon/hooks/useFollowReference.ts +++ b/app/javascript/mastodon/hooks/useFollowReference.ts @@ -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();