on master help sign in
Handle failure case for codegen
b687c79Liam Fitzgerald
src/views/Point.js+3−3
@@ -26,7 +26,7 @@ export default function Point() {
26
26
27 const point = need.point(pointCursor);
27 const point = need.point(pointCursor);
28
28
29− const { code } = useKeyfileGenerator();
29+ const { code, notice } = useKeyfileGenerator();
30
30
31 const {
31 const {
32 isParent,
32 isParent,
@@ -108,8 +108,8 @@ export default function Point() {
108 <Grid.Item
108 <Grid.Item
109 full
109 full
110 as={ForwardButton}
110 as={ForwardButton}
111− accessory={<CopyButton text={code} />}
111+ accessory={code && <CopyButton text={code} />}
112− detail={code}
112+ detail={code || notice}
113 detailClassName="mono">
113 detailClassName="mono">
114 Login Code
114 Login Code
115 </Grid.Item>
115 </Grid.Item>