Skip to content

Commit

Permalink
Merge pull request #2689 from IntersectMBO/fix/2686-share-button-is-m…
Browse files Browse the repository at this point in the history
…issing-from-the-dreps-details-page

feat(#2686): add share button to every DRep
  • Loading branch information
MSzalowski authored Jan 22, 2025
2 parents 5037c54 + cb10343 commit 93c34f7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ changes.

### Added

-
- Add share DRep button to every DRep instead of only our own [Issue 2686](https://github.com/IntersectMBO/govtool/issues/2686)

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {
getMetadataDataMissingStatusTranslation,
} from "@/utils";
import { ICONS } from "@/consts";
import { Share } from "./Share";
import { useScreenDimension } from "@/hooks";

type DataMissingHeaderProps = {
isDataMissing: MetadataValidationStatus | null;
Expand All @@ -24,6 +26,7 @@ export const DataMissingHeader = ({
image,
}: DataMissingHeaderProps) => {
const base64Image = getBase64ImageDetails(image ?? "");
const { screenWidth } = useScreenDimension();

return (
<Box
Expand Down Expand Up @@ -78,6 +81,7 @@ export const DataMissingHeader = ({
title}
</Typography>
</Box>
{screenWidth >= 1020 && <Share link={window.location.href} />}
</Box>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
useScreenDimension,
useTranslation,
} from "@hooks";
import { DataMissingHeader, Share } from "@molecules";
import { DataMissingHeader } from "@molecules";
import { correctDRepDirectoryFormat } from "@utils";
import { DRepData } from "@/models";

Expand Down Expand Up @@ -115,7 +115,6 @@ export const DRepDetailsCardHeader = ({
style={{ marginLeft: "4px" }}
/>
</Button>
{screenWidth >= 1020 && <Share link={window.location.href} />}
</Box>
)}
</Box>
Expand Down

0 comments on commit 93c34f7

Please sign in to comment.