on master help sign in
inviteconverter: always show button, add empty state
commitb8674fa330fa6b3b061e5762cf3167b2c9a6d9d3 authorHunter Miller <hunter@hmiller.dev> dateThu 10 Mar 2022, 16:20 (5 years ago) parent749ce56
1 file changed+4−6
src/components/L2/InviteConverter.tsx+4−6
src/components/L2/InviteConverter.tsx+4−6
@@ -177,10 +177,6 @@ export const InviteConverter = ({ points }: InviteConverterProps) => {
177177 return (sum += star.children.length);
178178 }, 0) > 0;
179179
180− if (!hasPlanets) {
181− return null;
182− }
183−
184180 if (generatingStatus !== 'initial') {
185181 return (
186182 <CreatingInvitesModal
@@ -235,7 +231,9 @@ export const InviteConverter = ({ points }: InviteConverterProps) => {
235231 mt={3}
236232 p={3}
237233 borderRadius={2}
238− overflowY="auto">
234+ overflowY="auto"
235+ alignItems={hasPlanets ? '' : 'center'}
236+ justifyContent={hasPlanets ? '' : 'center'}>
239237 {Object.entries(starMap).map(([patp, { children }]) => (
240238 <Col mb={4}>
241239 <Row>
@@ -268,7 +266,7 @@ export const InviteConverter = ({ points }: InviteConverterProps) => {
268266 ))}
269267 </Col>
270268 ))}
271− {}
269+ {!hasPlanets && <Text>No planets to update</Text>}
272270 </Col>
273271 <Row mt={3} justifyContent="end">
274272 <IndigoButton