index.tsx 457 B

1234567891011121314151617181920212223242526
  1. 'use client'
  2. import type { FC } from 'react'
  3. import { format } from '@/service/base'
  4. import React from 'react'
  5. export type ITextGenerationProps = {
  6. value: string
  7. className?: string
  8. }
  9. const TextGeneration: FC<ITextGenerationProps> = ({
  10. value,
  11. className,
  12. }) => {
  13. return (
  14. <div
  15. className={className}
  16. dangerouslySetInnerHTML={{
  17. __html: format(value)
  18. }}
  19. >
  20. </div>
  21. )
  22. }
  23. export default React.memo(TextGeneration)