import { ArrowLeftOutlined, ArrowRightOutlined } from '@ant-design/icons'; import { Link, useIntl } from 'dumi'; import type { FC } from 'react'; import { memo, useMemo } from 'react'; import { Flexbox } from 'react-layout-kit'; import { useStyles } from './Linker.style'; interface LinkerProps { title: string; link: string; type?: 'prev' | 'next'; } const Linker: FC = ({ title, link, type }) => { const { styles, cx } = useStyles(); const intl = useIntl(); const navContent = useMemo(() => { switch (type) { case 'prev': return ( <> {intl.formatMessage({ id: 'content.footer.actions.previous' })} ); case 'next': return ( <> {intl.formatMessage({ id: 'content.footer.actions.next' })} ); } }, [type]); return ( {navContent} {title} ); }; export default memo(Linker);