Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(#1267): hide the external link button when the metadata fails #1268

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ changes.
- Changed documents to prepare for open source [Issue 737](https://github.com/IntersectMBO/govtool/issues/737)
- Changed copy on maintenance page [Issue 753](https://github.com/IntersectMBO/govtool/issues/753)
- Update link to docs [Issue 1246](https://github.com/IntersectMBO/govtool/issues/1246)
- Hide the external data link when the metadata validation fails [Issue 1267](https://github.com/IntersectMBO/govtool/issues/1267)

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const GovernanceActionDetailsCardData = ({
expiryEpochNo={expiryEpochNo}
createdEpochNo={createdEpochNo}
/>
{isDataMissing && (
{!isDataMissing && (
<ExternalModalButton
url={url}
label={t("govActions.seeExternalData")}
Expand Down
3 changes: 2 additions & 1 deletion govtool/frontend/src/pages/DRepDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export const DRepDetails = ({ isConnected }: DRepDetailsProps) => {
url,
view,
votingPower,
metadataValid,
} = dRep;

const isMe = isSameDRep(dRep, myDRepId);
Expand Down Expand Up @@ -231,7 +232,7 @@ export const DRepDetails = ({ isConnected }: DRepDetailsProps) => {
sx={{ mb: 3 }}
/>
)}
{metadataStatus && !!url && (
{metadataValid && !!url && (
<ExternalModalButton
label={t("govActions.seeExternalData")}
sx={{ mb: 3 }}
Expand Down
Loading