@@ -3,31 +3,35 @@ import { Grid } from 'indigo-react';
33import * as ob from 'urbit-ob';
44import { ecliptic } from 'azimuth-js';
55
6−import View from 'components/View';
7−import InlineEthereumTransaction from 'components/InlineEthereumTransaction';
8−import ViewHeader from 'components/ViewHeader';
9−
106import { useNetwork } from 'store/network';
117import { usePointCache } from 'store/pointCache';
128import { usePointCursor } from 'store/pointCursor';
139import { useHistory } from 'store/history';
1410
11+import * as need from 'lib/need';
1512import { GAS_LIMITS } from 'lib/constants';
1613import useEthereumTransaction from 'lib/useEthereumTransaction';
17−import * as need from 'lib/need';
14+
15+import InlineEthereumTransaction from 'components/InlineEthereumTransaction';
16+import Window from 'components/L2/Window/Window';
17+import HeaderPane from 'components/L2/Window/HeaderPane';
18+import BodyPane from 'components/L2/Window/BodyPane';
19+import View from 'components/View';
20+import L2BackHeader from 'components/L2/Headers/L2BackHeader';
21+import { Row } from '@tlon/indigo-react';
1822
1923function useAdopt() {
20− const { contracts } = useNetwork();
24+ const { contracts }: any = useNetwork();
2125 const _contracts = need.contracts(contracts);
2226
23− const { pointCursor } = usePointCursor();
27+ const { pointCursor }: any = usePointCursor();
2428 const point = need.point(pointCursor);
2529
26− const { syncResidents } = usePointCache();
30+ const { syncResidents }: any = usePointCache();
2731
2832 return useEthereumTransaction(
2933 useCallback(
30− (adoptee, denied) =>
34+ (adoptee: number, denied: boolean) =>
3135 denied
3236 ? ecliptic.reject(_contracts, adoptee)
3337 : ecliptic.adopt(_contracts, adoptee),
@@ -39,7 +43,7 @@ function useAdopt() {
3943}
4044
4145export default function Adopt() {
42− const { pop, data } = useHistory();
46+ const { pop, data }: any = useHistory();
4347
4448 const { adoptee, denied } = data;
4549
@@ -51,12 +55,12 @@ export default function Adopt() {
5155 () =>
5256 denied ? (
5357 <>
54− {completed ? 'Denied' : 'Denying'} adoption request to{' '}
58+ {completed ? 'Rejected' : 'Rejecting'} adoption request for{' '}
5559 <span className="mono">{patp}</span>
5660 </>
5761 ) : (
5862 <>
59− {completed ? 'Approved' : 'Approving'} adoption request to{' '}
63+ {completed ? 'Approved' : 'Approving'} adoption request for{' '}
6064 <span className="mono">{patp}</span>
6165 </>
6266 ),
@@ -67,22 +71,33 @@ export default function Adopt() {
6771 construct(adoptee, denied);
6872 }, [construct, adoptee, denied]);
6973
74+ const headerText = `${denied ? 'Reject' : 'Approve'} Adoption Request`;
75+
7076 return (
71− <View pop={() => pop()} inset>
72− <Grid>
73− <Grid.Item full as={ViewHeader} className="mb2">
74− Adopt
75− </Grid.Item>
76− <Grid.Item full className="gray4 f5 mv2">
77− {body}
78− </Grid.Item>
79− <Grid.Item
80− full
81− {...bind}
82− as={InlineEthereumTransaction}
83− onReturn={() => pop()}
84− />
85− </Grid>
77+ <View
78+ className="adopt-l1"
79+ pop={pop}
80+ inset
81+ hideBack
82+ header={<L2BackHeader hideBalance back={pop} />}>
83+ <Window>
84+ <HeaderPane>
85+ <Row className="header-row">
86+ <h5>{headerText}</h5>
87+ </Row>
88+ </HeaderPane>
89+ <BodyPane>
90+ <Grid.Item className="f5 mv2 w-full" style={{ fontSize: 14 }}>
91+ {body}
92+ </Grid.Item>
93+ <Grid.Item
94+ full
95+ {...bind}
96+ as={InlineEthereumTransaction}
97+ onReturn={() => pop()}
98+ />
99+ </BodyPane>
100+ </Window>
86101 </View>
87102 );
88103}