NewAppCard.tsx 1.0 KB

12345678910111213141516171819202122232425262728
  1. 'use client'
  2. import { useState } from 'react'
  3. import classNames from 'classnames'
  4. import { useTranslation } from 'react-i18next'
  5. import style from '../list.module.css'
  6. import NewAppDialog from './NewAppDialog'
  7. const CreateAppCard = () => {
  8. const { t } = useTranslation()
  9. const [showNewAppDialog, setShowNewAppDialog] = useState(false)
  10. return (
  11. <a className={classNames(style.listItem, style.newItemCard)} onClick={() => setShowNewAppDialog(true)}>
  12. <div className={style.listItemTitle}>
  13. <span className={style.newItemIcon}>
  14. <span className={classNames(style.newItemIconImage, style.newItemIconAdd)} />
  15. </span>
  16. <div className={classNames(style.listItemHeading, style.newItemCardHeading)}>
  17. {t('app.createApp')}
  18. </div>
  19. </div>
  20. {/* <div className='text-xs text-gray-500'>{t('app.createFromConfigFile')}</div> */}
  21. <NewAppDialog show={showNewAppDialog} onClose={() => setShowNewAppDialog(false)} />
  22. </a>
  23. )
  24. }
  25. export default CreateAppCard