Skip to content

Commit 3f9d770

Browse files
committed
fix(explorer): always show epoch settings buttons
But disabled if the data needed to construct their target url is not yet available.
1 parent 30a959a commit 3f9d770

File tree

1 file changed

+17
-15
lines changed
  • mithril-explorer/src/components/EpochSettings

1 file changed

+17
-15
lines changed

mithril-explorer/src/components/EpochSettings/index.js

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,23 @@ export default function EpochSettings() {
8181
</Row>
8282
</Container>
8383
</Card.Body>
84-
{registrationPageUrl && inOutRegistrationsPageUrl && (
85-
<Card.Footer>
86-
<Stack
87-
direction="horizontal"
88-
gap={1}
89-
className="justify-content-md-end align-items-stretch justify-content-sm-center">
90-
<LinkButton href={registrationPageUrl}>
91-
<i className="bi bi-pen"></i> Registered Signers
92-
</LinkButton>
93-
<LinkButton href={inOutRegistrationsPageUrl} className="">
94-
<i className="bi bi-arrow-left-right translate-middle-y"></i> In/Out Registrations
95-
</LinkButton>
96-
</Stack>
97-
</Card.Footer>
98-
)}
84+
<Card.Footer>
85+
<Stack
86+
direction="horizontal"
87+
gap={1}
88+
className="justify-content-md-end align-items-stretch justify-content-sm-center">
89+
<LinkButton
90+
href={registrationPageUrl ?? "#"}
91+
disabled={registrationPageUrl === undefined}>
92+
<i className="bi bi-pen"></i> Registered Signers
93+
</LinkButton>
94+
<LinkButton
95+
href={inOutRegistrationsPageUrl ?? "#"}
96+
disabled={inOutRegistrationsPageUrl === undefined}>
97+
<i className="bi bi-arrow-left-right translate-middle-y"></i> In/Out Registrations
98+
</LinkButton>
99+
</Stack>
100+
</Card.Footer>
99101
</Card>
100102
</div>
101103
);

0 commit comments

Comments
 (0)