import { theme } from 'antd'; interface Props { /** Override the title shown next to the copyright. Defaults to VITE_APP_TITLE. */ title?: string; /** Footer height in px. Defaults to 50. */ height?: number; } /** * 全局页脚 — 居中显示版权信息(年份自动取当前)。 */ const Footer: React.FC = ({ title, height = 50 }) => { const { token } = theme.useToken(); const currentYear = new Date().getFullYear(); const text = title ?? import.meta.env.VITE_APP_TITLE ?? ''; return (
Copyright ©{currentYear} {text}
); }; export default Footer;