Skip to main content

UserDecorationWrapper

Client memo wrapper wiring useUserDecoration + flair preference refresh into DecorationRenderer.

Exports​

  • UserDecorationWrapper — named export
  • UserDecorationWrapperProps — interface

Props (UserDecorationWrapperProps)​

PropTypeDefaultBehavior
userIdstring—Passed to decoration hook
childrenReactNode—Wrapped content
classNamestring''Forwarded to renderer
forceDecorationstring—Override fetched decoration
enabledbooleantrueHook enable flag
showErrorbooleanfalseForwarded to renderer
data-testidstring—Forwarded to renderer

Behavior​

  • useFlairPreference() supplies refreshTrigger so decoration re-fetches when flair toggles change.
  • Maps decoration, isLoading, and error from useUserDecoration into DecorationRenderer props unchanged.

Sources: src/app/components/decoration/UserDecorationWrapper.tsx, @lib/hooks/useUserDecoration, @lib/context/UserPreferencesContext