@@ -76,6 +76,7 @@ export default function InviteCohort() {
76 generateInviteCodes,
76 generateInviteCodes,
77 getPendingTransactions,
77 getPendingTransactions,
78 getInvites,
78 getInvites,
79 } = useRoller();
80 } = useRoller();
80 const { contracts }: any = useNetwork();
81 const { contracts }: any = useNetwork();
81 const { syncControlledPoints }: any = usePointCache();
82 const { syncControlledPoints }: any = usePointCache();
@@ -195,6 +196,7 @@ export default function InviteCohort() {
196 await generateInviteCodes(numInvites);
197 await generateInviteCodes(numInvites);
197 getPendingTransactions();
198 getPendingTransactions();
199+ getAndUpdatePoint(point.value);
199 } catch (error) {
201 } catch (error) {
200 // TODO: error is not used anywhere on the UI
202 // TODO: error is not used anywhere on the UI
@@ -209,6 +211,8 @@ export default function InviteCohort() {
209 getPendingTransactions,
211 getPendingTransactions,
211 setInviteGeneratingNum,
213 setInviteGeneratingNum,
214 const downloadCsv = useCallback(() => {
218 const downloadCsv = useCallback(() => {
@@ -467,14 +471,21 @@ export default function InviteCohort() {
468 </BodyPane>
472 </BodyPane>
469 </Window>
473 </Window>
470− {showAddMoreButton && (
474+ {showAddMoreButton ? (
472 onClick={() => setShowInviteForm(true)}
476 onClick={() => setShowInviteForm(true)}
473 className="add-more"
477 className="add-more"
474 accessory={<Icon icon="ChevronEast" />}>
478 accessory={<Icon icon="ChevronEast" />}>
476 </Button>
480 </Button>
477− )}
481+ ) : point.l2Quota < 1 ? (
482+ <Box className="invite-limit-message">
483+ You have hit your weekly invite limit. You will be able to generate
485+ <strong>{` ${config?.rollerQuota}`}</strong> invites on
486+ <strong>{` ${ddmmmYYYY(nextQuotaTime)}`}</strong>.
478 <LoadingOverlay loading={loading} text={generatingCodesText} />
489 <LoadingOverlay loading={loading} text={generatingCodesText} />