apps-info.tsx 733 B

1234567891011121314151617181920212223242526272829303132
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. import { useTranslation } from 'react-i18next'
  5. import { ChatBot } from '../../base/icons/src/vender/line/communication'
  6. import UsageInfo from '../usage-info'
  7. import { useProviderContext } from '@/context/provider-context'
  8. type Props = {
  9. className?: string
  10. }
  11. const AppsInfo: FC<Props> = ({
  12. className,
  13. }) => {
  14. const { t } = useTranslation()
  15. const { plan } = useProviderContext()
  16. const {
  17. usage,
  18. total,
  19. } = plan
  20. return (
  21. <UsageInfo
  22. className={className}
  23. Icon={ChatBot}
  24. name={t('billing.plansCommon.buildApps')}
  25. usage={usage.buildApps}
  26. total={total.buildApps}
  27. />
  28. )
  29. }
  30. export default React.memo(AppsInfo)