Skip to main content

UsernameDecoration

Wraps display name children with optional animated decoration class from server action getUserDecoration.

Props​

PropRole
userIdFetch target
forceDecorationAdmin/Story override string
childrenUsername text nodes

Behavior​

Subscribes to useFlairPreference so preference edits refetch. Uses useTransition around the server action call. On error, falls back to undecorated children; loading states avoid layout shift where possible.


Sources: src/app/components/subscription-badges/UsernameDecoration.tsx, @lib/actions/subscription.actions, @lib/context/UserPreferencesContext