Add download button for terms and conditions PDF (#31)

Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675)

- Replace Cosmos address with Laconic address

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
Reviewed-on: #31
This commit is contained in:
nabarun 2024-08-11 09:47:18 +00:00
parent 663eb42a74
commit 09104b50bf
5 changed files with 17 additions and 7 deletions

View File

@ -16,7 +16,12 @@ const TermsAndConditionsDialog: React.FC<TermsDialogProps> = ({ open, onClose })
<TermsAndConditionsBox height='65vh' /> <TermsAndConditionsBox height='65vh' />
</DialogContent> </DialogContent>
<DialogActions> <DialogActions>
<Button onClick={onClose} color="primary"> <Button>
<a href="/TermsAndConditions.pdf" download style={{textDecoration: "none", color: "inherit"}}>
Download PDF
</a>
</Button>
<Button onClick={onClose}>
Close Close
</Button> </Button>
</DialogActions> </DialogActions>

View File

@ -37,7 +37,12 @@ const LandingPage = () => {
</Typography> </Typography>
</Box> </Box>
<TermsAndConditionsBox height="43vh" onLoad={()=>{setIsDisabled(false);}} /> <TermsAndConditionsBox height="43vh" onLoad={()=>{setIsDisabled(false);}} />
<Box m={2} display="flex" justifyContent="center"> <Box m={2} display="flex" justifyContent="center" gap={2}>
<Button variant="outlined" color="primary" disabled={isDisabled}>
<a href="/TermsAndConditions.pdf" download style={{textDecoration: "none", color: "inherit"}}>
Download PDF
</a>
</Button>
<Button variant="contained" color="primary" onClick={handleAccept} disabled={isDisabled}> <Button variant="contained" color="primary" onClick={handleAccept} disabled={isDisabled}>
Accept Accept
</Button> </Button>

View File

@ -33,7 +33,7 @@ const OnboardingSuccess = () => {
const fetchParticipants = async () => { const fetchParticipants = async () => {
try { try {
if (!cosmosAddress) { if (!cosmosAddress) {
enqueueSnackbar("Cosmos address is not provided", { variant: "error" }); enqueueSnackbar("Laconic address is not provided", { variant: "error" });
return; return;
} }
const participant: Participant = await registry.getParticipantByAddress(cosmosAddress); const participant: Participant = await registry.getParticipantByAddress(cosmosAddress);
@ -93,7 +93,7 @@ const OnboardingSuccess = () => {
<pre style={{ whiteSpace: "pre-wrap", margin: 0 }}> <pre style={{ whiteSpace: "pre-wrap", margin: 0 }}>
{participant && ( {participant && (
<div> <div>
Cosmos Address: {participant.cosmosAddress} <br /> Laconic Address: {participant.cosmosAddress} <br />
Nitro Address: {participant.nitroAddress} <br /> Nitro Address: {participant.nitroAddress} <br />
Role: {participant.role} <br /> Role: {participant.role} <br />
KYC ID: {participant.kycId} <br /> KYC ID: {participant.kycId} <br />

View File

@ -157,7 +157,7 @@ const SignWithCosmos = () => {
<Typography variant="h5" display={`${isTncAccepted ? "none" : "block"}`}>Please accept terms and conditions to continue</Typography> <Typography variant="h5" display={`${isTncAccepted ? "none" : "block"}`}>Please accept terms and conditions to continue</Typography>
<SelectRoleCard handleAccept={() => setIsTncAccepted(true)} handleRoleChange={setRole}/> <SelectRoleCard handleAccept={() => setIsTncAccepted(true)} handleRoleChange={setRole}/>
<Typography variant="h5">Send transaction to chain</Typography> <Typography variant="h5">Send transaction to chain</Typography>
<Typography>Cosmos Account:</Typography> <Typography>Laconic Account:</Typography>
<Card className='mt-1 mb-1'> <Card className='mt-1 mb-1'>
<CardContent> <CardContent>
<Grid container spacing={2}> <Grid container spacing={2}>

View File

@ -177,7 +177,7 @@ const Validator = () => {
> >
{participant && ( {participant && (
<pre style={{ whiteSpace: "pre-wrap", margin: 0 }}> <pre style={{ whiteSpace: "pre-wrap", margin: 0 }}>
Cosmos Address: {participant.cosmosAddress} <br /> Laconic Address: {participant.cosmosAddress} <br />
Nitro Address: {participant.nitroAddress} <br /> Nitro Address: {participant.nitroAddress} <br />
Role: {participant.role} <br /> Role: {participant.role} <br />
KYC ID: {participant.kycId} <br /> KYC ID: {participant.kycId} <br />