Add undesigned functionality of follow modal. For #1862

This commit is contained in:
Gabe Kangas
2022-06-24 15:55:53 -07:00
parent 78dc183c11
commit 5d65b4b3b1
4 changed files with 101 additions and 13 deletions

View File

@@ -1,11 +1,17 @@
import { Button } from 'antd';
import { HeartFilled } from '@ant-design/icons';
import { useState } from 'react';
import { useRecoilValue } from 'recoil';
import Modal from '../ui/Modal/Modal';
import FollowModal from '../modals/Follow/FollowModal';
import s from './ActionButton.module.scss';
import { clientConfigStateAtom } from '../stores/ClientConfigStore';
import { ClientConfig } from '../../interfaces/client-config.model';
export default function FollowButton() {
const [showModal, setShowModal] = useState(false);
const clientConfig = useRecoilValue<ClientConfig>(clientConfigStateAtom);
const { name } = clientConfig;
const buttonClicked = () => {
setShowModal(true);
@@ -21,11 +27,9 @@ export default function FollowButton() {
>
Follow
</Button>
<Modal
title="Follow <servername>"
visible={showModal}
handleCancel={() => setShowModal(false)}
/>
<Modal title={`Follow ${name}`} visible={showModal} handleCancel={() => setShowModal(false)}>
<FollowModal handleClose={() => setShowModal(false)} />
</Modal>
</>
);
}