first commit
This commit is contained in:
18
src/features/engagement/components/AttributionNote.tsx
Normal file
18
src/features/engagement/components/AttributionNote.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
'use client';
|
||||
|
||||
import {Text} from '@astryxdesign/core/Text';
|
||||
import {ATTRIBUTION_NOTE, type Attribution} from '@/features/engagement/types/engagement';
|
||||
|
||||
/**
|
||||
* The disclosure beside every attributed figure. Renders NOTHING when the
|
||||
* basis is `observed`, so a real attribution backend retires it with no copy
|
||||
* change. The basis is read off the payload, never hardcoded.
|
||||
*/
|
||||
export function AttributionNote({basis}: {basis: Attribution}) {
|
||||
if (basis === 'observed') return null;
|
||||
return (
|
||||
<Text size="xsm" color="secondary">
|
||||
{ATTRIBUTION_NOTE}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user