import { DefaultFooter } from '@ant-design/pro-components';
import React from 'react';
import { useModel } from 'umi';

const Footer = () => {
  const { initialState, loading, error, refresh, setInitialState } = useModel('@@initialState');

  const currentYear = new Date().getFullYear();

  return (
    <DefaultFooter
      style={{
        background: 'none',
      }}
      copyright={`${currentYear} ${initialState?.config?.title}`}
      links={[
        {
          key: initialState?.config?.title || 'xkl',
          title: initialState?.config?.title,
          href: '/',
          blankTarget: true,
        },
      ]}
    />
  );
};

export default Footer;
