on master help sign in
fix design discrepancies
commita0107e0e02016756e066dd2bb73d6299bfc6a699 authorLiam Fitzgerald <liam@urizen.co> dateFri 3 Jan 2020, 14:35 (7 years ago) parent9f467d5
5 files changed+28−15
src/components/BarGraph.js+1−1 src/components/InviteSigilList.js+2−2 src/views/Invite/Cohort.js+13−7 src/views/Party/ShowParty.js+2−2 src/views/Point.js+10−3
src/components/BarGraph.js+1−1
@@ -11,7 +11,7 @@ const BarGraph = ({
1111 const _available = available.getOrElse(1);
1212 const _sent = sent.getOrElse(0);
1313 const _accepted = accepted.getOrElse(0);
14− const total = _available + _sent + _accepted;
14+ const total = _available + _sent;
1515 return (
1616 <div className={cn('h7 p1 b1 b-black flex', className)}>
1717 <div
src/components/InviteSigilList.js+2−2
@@ -27,7 +27,7 @@ const InviteSigilList = ({ className, pendingPoints, acceptedPoints }) => {
2727 return (
2828 <>
2929 {points.map((point, idx) => (
30− <div className={cn(klassName, 'h9 w9')}>
30+ <div key={idx} className={cn(klassName, 'h9 w9')}>
3131 <MaybeSigil patp={point} size={50} colors={colors} />
3232 </div>
3333 ))}
@@ -39,7 +39,7 @@ const InviteSigilList = ({ className, pendingPoints, acceptedPoints }) => {
3939 <div className={cn('flex justify-between', className)}>
4040 {renderSigil(_acceptedPoints, ['#000000', '#FFFFFF'])}
4141 {renderSigil(_pendingPoints, ['#ee892b', '#FFFFFF'])}
42− {renderSigil(empty, [], 'b1 b-black')}
42+ {renderSigil(empty, [], 'b1 b-black b-dashed')}
4343 </div>
4444 );
4545};
src/views/Invite/Cohort.js+13−7
@@ -198,6 +198,7 @@ const useInviter = sendInvites => {
198198 setTxStatus(STATUS.SUCCESS);
199199 setInvites(confirmedInvites);
200200 console.log(unsentInvites);
201+ console.log(confirmedInvites);
201202
202203 if (unsentInvites.length > 0) {
203204 return { [FORM_ERROR]: unsentInvites };
@@ -410,14 +411,19 @@ const InviteUrl = () => {
410411 return (
411412 <Grid.Item full as={Grid}>
412413 {invites.length > 0 && (
413− <Grid.Item full className="b-gray3 b1 mv4 p1 flex flex-center">
414− <div className="flex1 ml1">{url}</div>
415− <Grid.Item
416− className="pv3 ph4 bg-black white"
417− onClick={() => doCopy()}>
418− {didCopy ? 'Copied' : 'Copy'}
414+ <>
415+ <Grid.Item full className="b-gray3 b1 mv4 p1 flex flex-center">
416+ <div className="flex1 ml1">{url}</div>
417+ <Grid.Item
418+ className="pv3 ph4 bg-black white"
419+ onClick={() => doCopy()}>
420+ {didCopy ? 'Copied' : 'Copy'}
421+ </Grid.Item>
419422 </Grid.Item>
420− </Grid.Item>
423+ <Grid.Item full>
424+ Your invite link expires after consumption.
425+ </Grid.Item>
426+ </>
421427 )}
422428 {invites.length === 0 && renderGenerateButton()}
423429 {needFunds && <Grid.Item full as={NeedFundsNotice} {...needFunds} />}
src/views/Party/ShowParty.js+2−2
@@ -113,7 +113,7 @@ export default function ShowParty() {
113113 const _pendingInvites = _pendingPoints.length;
114114 const _acceptedInvites = _acceptedPoints.length;
115115 const _totalInvites = availableInvites
116− .map(a => sentInvites.getOrElse(0) + a + _acceptedInvites)
116+ .map(a => sentInvites.getOrElse(0) + a)
117117 .getOrElse(0);
118118
119119 return (
@@ -133,7 +133,7 @@ export default function ShowParty() {
133133 <Grid.Item full>
134134 <Flex align="center">
135135 <Flex.Item>
136− {_acceptedInvites} / {_totalInvites}
136+ {_acceptedInvites + _pendingInvites} / {_totalInvites}
137137 </Flex.Item>
138138 {_pendingInvites && (
139139 <Flex.Item as={Chip} color="yellow">
src/views/Point.js+10−3
@@ -1,4 +1,5 @@
11import React, { useCallback, useState } from 'react';
2+import cn from 'classnames';
23import { Just } from 'folktale/maybe';
34import { Grid, Flex } from 'indigo-react';
45import { azimuth } from 'azimuth-js';
@@ -162,17 +163,23 @@ export default function Point() {
162163 <br />
163164 </Grid.Item>
164165
165− <Grid.Item className="t-right" onClick={goParty} cols={[11, 13]}>
166+ <Grid.Item
167+ className={cn('t-right underline', {
168+ gray4: sentInvites.getOrElse(0) === 0,
169+ })}
170+ onClick={goParty}
171+ cols={[11, 13]}>
166172 View
167173 </Grid.Item>
168174 <Grid.Item full>
169175 <Flex align="center">
170176 <Flex.Item>
171− {acceptedInvites.getOrElse(0)} / {_totalInvites}
177+ {acceptedInvites.getOrElse(0) + _pendingInvites} /{' '}
178+ {_totalInvites}
172179 </Flex.Item>
173180 {_pendingInvites > 0 && (
174181 <Flex.Item as={Chip} color="yellow">
175− {_pendingInvites.getOrElse([]).length} pending
182+ {_pendingInvites} pending
176183 </Flex.Item>
177184 )}
178185 </Flex>