mirror of
https://github.com/myfatemi04/wheelshare-frontend.git
synced 2025-06-13 01:06:05 -04:00
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
import { lightgrey } from '../../lib/colors';
|
|
import UIButton from '../UI/UIButton';
|
|
import InvitationList from './InvitationList';
|
|
import MailOutlineIcon from '@material-ui/icons/MailOutline';
|
|
import PersonAddIcon from '@material-ui/icons/PersonAdd';
|
|
import useToggle from '../useToggle';
|
|
|
|
export default function InvitationsAndRequests() {
|
|
const [invitationsOpen, toggleInvitationsOpen] = useToggle(false);
|
|
|
|
return (
|
|
<>
|
|
<div
|
|
style={{
|
|
display: 'flex',
|
|
flexDirection: 'row',
|
|
margin: '0.5rem 0',
|
|
}}
|
|
>
|
|
{/* Requests */}
|
|
<UIButton
|
|
style={{
|
|
marginRight: '0.25rem',
|
|
backgroundColor: lightgrey,
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
}}
|
|
onClick={console.log}
|
|
>
|
|
<MailOutlineIcon style={{ marginRight: '0.5rem' }} /> 1 request
|
|
</UIButton>
|
|
{/* Invitations */}
|
|
<UIButton
|
|
style={{
|
|
marginLeft: '0.25rem',
|
|
backgroundColor: lightgrey,
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
}}
|
|
onClick={toggleInvitationsOpen}
|
|
>
|
|
<PersonAddIcon style={{ marginRight: '0.5rem' }} /> Invite
|
|
</UIButton>
|
|
</div>
|
|
|
|
{invitationsOpen && <InvitationList />}
|
|
</>
|
|
);
|
|
}
|