import { Icon } from '@lobehub/ui'; import { Link } from 'dumi'; import { ArrowLeft, ArrowRight } from 'lucide-react'; import { memo, useMemo } from 'react'; import { Flexbox } from 'react-layout-kit'; import { useStyles } from './Linker.style'; interface LinkerProps { link: string; title: string; type?: 'prev' | 'next'; } const Linker = memo(({ title, link, type }) => { const { styles, cx } = useStyles(); const navContent = useMemo(() => { switch (type) { case 'prev': { return ( <> Previous ); } case 'next': { return ( <> Next ); } } }, [type]); return ( {navContent} {title} ); }); export default Linker;