2022-09-30 14:16:35 +03:00
|
|
|
import { Button } from 'antd';
|
2023-01-16 09:31:36 +03:00
|
|
|
import dynamic from 'next/dynamic';
|
2023-02-18 22:58:46 +03:00
|
|
|
import { FC } from 'react';
|
2022-09-30 14:16:35 +03:00
|
|
|
import styles from './ChatContainer.module.scss';
|
|
|
|
|
2023-01-16 09:31:36 +03:00
|
|
|
// Lazy loaded components
|
|
|
|
|
|
|
|
const VerticalAlignBottomOutlined = dynamic(
|
|
|
|
() => import('@ant-design/icons/VerticalAlignBottomOutlined'),
|
|
|
|
{
|
|
|
|
ssr: false,
|
|
|
|
},
|
|
|
|
);
|
2023-02-18 22:58:46 +03:00
|
|
|
|
2022-09-30 14:16:35 +03:00
|
|
|
type Props = {
|
2023-02-18 22:58:46 +03:00
|
|
|
onClick: () => void;
|
2022-09-30 14:16:35 +03:00
|
|
|
};
|
|
|
|
|
2023-02-18 22:58:46 +03:00
|
|
|
export const ScrollToBotBtn: FC<Props> = ({ onClick }) => (
|
2022-09-30 14:16:35 +03:00
|
|
|
<div className={styles.toBottomWrap}>
|
|
|
|
<Button
|
|
|
|
type="default"
|
|
|
|
style={{ color: 'currentColor' }}
|
|
|
|
icon={<VerticalAlignBottomOutlined />}
|
2023-02-18 22:58:46 +03:00
|
|
|
onClick={onClick}
|
2022-09-30 14:16:35 +03:00
|
|
|
>
|
|
|
|
Go to last message
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
);
|