Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
10 lines
447 B
TypeScript
10 lines
447 B
TypeScript
'use client';
|
|
|
|
import { useAgency } from './client';
|
|
|
|
/** Строка на бирке подарка: код из ссылки агентства (?a=) или подсказка, где его взять */
|
|
export function GiftCode({ withCode, withoutCode }: { withCode: string; withoutCode: string }) {
|
|
const agency = useAgency();
|
|
return <span className="v3-tag__code">{agency ? withCode.replace('{{code}}', agency) : withoutCode}</span>;
|
|
}
|