Title.tsx raw

   1  import { Event } from 'nostr-tools'
   2  import { useTranslation } from 'react-i18next'
   3  
   4  export default function Title({ parentStuff }: { parentStuff?: Event | string }) {
   5    const { t } = useTranslation()
   6  
   7    return parentStuff ? (
   8      <div className="flex gap-2 items-center w-full">
   9        <div className="shrink-0">{t('Reply to')}</div>
  10        {typeof parentStuff === 'string' && (
  11          <div className="text-primary truncate">{parentStuff}</div>
  12        )}
  13      </div>
  14    ) : (
  15      t('New Note')
  16    )
  17  }
  18