Skip to content

Commit

Permalink
change navto items
Browse files Browse the repository at this point in the history
  • Loading branch information
Sworzen1 committed May 9, 2024
1 parent 0f27b2e commit 9508e77
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions govtool/frontend/src/pages/DRepDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,11 @@ export const DRepDetails = ({ isConnected }: DRepDetailsProps) => {
</DRepDetailsInfoItem>
{/* TODO: fetch metadata, add views for metadata errors */}
<DRepDetailsInfoItem label={t("email")}>
{/* TODO: change email*/}

Check failure on line 178 in govtool/frontend/src/pages/DRepDetails.tsx

View workflow job for this annotation

GitHub Actions / lint

Expected space or tab before '*/' in comment
<MoreInfoLink
label="darlenelonglink.DRepwebsiteorwhatever.com"
navTo="google.com"
navTo="example@gmail.com"
isEmail
/>
</DRepDetailsInfoItem>
<DRepDetailsInfoItem label={t("moreInformation")}>
Expand All @@ -187,8 +189,13 @@ export const DRepDetails = ({ isConnected }: DRepDetailsProps) => {
flexDirection="column"
gap={1.5}
>
{/* TODO: update links*/}

Check failure on line 192 in govtool/frontend/src/pages/DRepDetails.tsx

View workflow job for this annotation

GitHub Actions / lint

Expected space or tab before '*/' in comment
{LINKS.map((link) => (
<MoreInfoLink key={link} label={link} navTo={link} />
<MoreInfoLink
key={link}
label={link}
navTo="https://sancho.network/"
/>
))}
</Box>
</DRepDetailsInfoItem>
Expand Down Expand Up @@ -299,10 +306,12 @@ const DRepId = ({ children }: PropsWithChildren) => (
type LinkWithIconProps = {
label: string;
navTo: string;
isEmail?: boolean;
};

const MoreInfoLink = ({ label, navTo }: LinkWithIconProps) => {
const openLink = () => openInNewTab(navTo);
const MoreInfoLink = ({ label, navTo, isEmail = false }: LinkWithIconProps) => {
const openLink = () =>

Check failure on line 313 in govtool/frontend/src/pages/DRepDetails.tsx

View workflow job for this annotation

GitHub Actions / lint

Arrow function used ambiguously with a conditional expression
isEmail ? window.location.assign(`mailto:${navTo}`) : openInNewTab(navTo);

return (
<ButtonBase
Expand Down

0 comments on commit 9508e77

Please sign in to comment.