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.

1.0 KB
Raw Blame
'use client';

import '@lobehub/ui/theme.css';
import '@lobehub/ui/global.css';
import '@lobehub/ui/style.css';

import ConfigProvider from '@lobehub/ui/es/ConfigProvider/index';
import { domMax, LazyMotion } from 'motion/react';
import * as m from 'motion/react-m';
import { memo, type PropsWithChildren } from 'react';

import Image from '@/libs/next/Image';
import Link from '@/libs/next/Link';

interface WorkbenchThemeProps extends PropsWithChildren {
  enableCustomFonts?: boolean;
}

const WorkbenchTheme = memo<WorkbenchThemeProps>(({ children, enableCustomFonts }) => {
  return (
    <ConfigProvider
      config={{ aAs: Link, imgAs: Image, imgUnoptimized: true }}
      enableCustomFonts={enableCustomFonts}
      motion={m}
    >
      <div
        className={'workbench-layout'}
        style={{ height: '100%', minHeight: '100dvh', width: '100%' }}
      >
        <LazyMotion features={domMax}>{children}</LazyMotion>
      </div>
    </ConfigProvider>
  );
});

WorkbenchTheme.displayName = 'WorkbenchTheme';

export default WorkbenchTheme;