@@ -1,5 +1,5 @@
11import React, { useMemo, useEffect, useCallback, useState } from 'react';
2−import { Grid, Flex } from 'indigo-react';
2+import { Grid, Flex, Button } from 'indigo-react';
33import * as ob from 'urbit-ob';
44import { Just } from 'folktale/maybe';
55import cn from 'classnames';
@@ -9,9 +9,9 @@ import { usePointCache } from 'store/pointCache';
99
1010import View from 'components/View';
1111import BarGraph from 'components/BarGraph';
12−import InviteSigilList from 'components/InviteSigilList';
1312import MaybeSigil from 'components/MaybeSigil';
1413import { matchBlinky } from 'components/Blinky';
14+import { ForwardButton } from 'components/Buttons';
1515import Chip from 'components/Chip';
1616import Crumbs from 'components/Crumbs';
1717
@@ -19,6 +19,8 @@ import { useLocalRouter } from 'lib/LocalRouter';
1919import useInvites from 'lib/useInvites';
2020import * as need from 'lib/need';
2121
22+import Inviter from 'views/Invite/Inviter';
23+
2224import { ReactComponent as SearchIcon } from 'assets/search.svg';
2325
2426function CohortMember({ point, className }) {
@@ -73,8 +75,8 @@ function CohortList({ points, className }) {
7375 return (
7476 <Grid gap={3} className={cn('mt1', className)}>
7577 <Grid.Item align="center" full as={Flex} className="b b-gray2 b1">
76− <Flex.Item>
77− <SearchIcon className="p2" />
78+ <Flex.Item className="p2">
79+ <SearchIcon />
7880 </Flex.Item>
7981
8082 <Flex.Item
@@ -82,7 +84,7 @@ function CohortList({ points, className }) {
8284 as={'input'}
8385 value={query}
8486 onChange={handleChange}
85− className="b-none"
87+ className="b-none h7"
8688 />
8789 </Grid.Item>
8890 <>
@@ -113,6 +115,8 @@ export default function InviteCohort() {
113115 sentInvites,
114116 } = useInvites(point);
115117
118+ const [showInviteForm, setShowInviteForm] = useState(false);
119+
116120 const _acceptedPoints = acceptedPoints.getOrElse([]);
117121 const _pendingPoints = pendingPoints.getOrElse([]);
118122 const _pendingInvites = _pendingPoints.length;
@@ -140,8 +144,8 @@ export default function InviteCohort() {
140144 <Flex.Item>
141145 {_acceptedInvites + _pendingInvites} / {_totalInvites}
142146 </Flex.Item>
143− {_pendingInvites && (
144− <Flex.Item as={Chip} color="yellow">
147+ {_pendingInvites !== 0 && (
148+ <Flex.Item as={Chip} className="bg-yellow4 white">
145149 {_pendingInvites} pending
146150 </Flex.Item>
147151 )}
@@ -154,12 +158,18 @@ export default function InviteCohort() {
154158 sent={sentInvites}
155159 accepted={acceptedInvites}
156160 />
157− <Grid.Item
158− full
159− as={InviteSigilList}
160− pendingPoints={pendingPoints}
161− acceptedPoints={acceptedPoints}
162− />
161+ {availableInvites.getOrElse(0) !== 0 && !showInviteForm && (
162+ <Grid.Item
163+ full
164+ solid
165+ center
166+ as={Button}
167+ onClick={() => setShowInviteForm(true)}>
168+ Add Members
169+ </Grid.Item>
170+ )}
171+ {showInviteForm && <Inviter />}
172+
163173 <Grid.Item full as={CohortList} points={_acceptedPoints} />
164174 </Grid>
165175 </View>