Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

894 B
Raw Blame
'use client';

import { Center, Flexbox, ScrollArea } from '@lobehub/ui';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';

import ChangelogContent from './ChangelogContent';
import { useChangelogModalIndex } from './useChangelog';

const SCROLL_HEIGHT = 'min(80vh, 760px)';

const ChangelogModalContent = memo(() => {
  const { t } = useTranslation('common');
  const data = useChangelogModalIndex();

  return (
    <ScrollArea scrollFade style={{ height: SCROLL_HEIGHT }}>
      {!data || data.length === 0 ? (
        <Center style={{ height: SCROLL_HEIGHT }}>{t('loading')}</Center>
      ) : (
        <Flexbox gap={16} padding={16} style={{ width: '100%' }}>
          <ChangelogContent data={data} />
        </Flexbox>
      )}
    </ScrollArea>
  );
});

ChangelogModalContent.displayName = 'ChangelogModalContent';

export default ChangelogModalContent;