Skip to content

Commit

Permalink
add link to github
Browse files Browse the repository at this point in the history
  • Loading branch information
juliensnz authored and Julien Sanchez committed Sep 20, 2023
1 parent 173d483 commit e786e7b
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/components/NodeReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
SwitcherButton,
Table,
useBooleanState,
ViewIcon,
} from 'akeneo-design-system';
import {Link, useRouteMatch} from 'react-router-dom';
import styled from 'styled-components';
Expand Down Expand Up @@ -180,14 +181,19 @@ const NodeReport = ({report, reportName, reports, onReportChange}: NodeReportPro
<SpacedCell>
{'file' === child.type ? <FileIcon size={20} /> : <FolderIcon size={20} />}&nbsp;&nbsp;
{'file' === child.type ? child.name : <Link to={childUrl}>{child.name}</Link>}
<IconButton
size="small"
ghost="borderless"
level="tertiary"
icon={<CopyIcon />}
title="Copy to clipboard"
onClick={() => copyToClipboard(child.path)}
/>
<a
href={child.path
.replace('/enterprise/', 'https://github.com/akeneo/pim-enterprise-dev/blob/master/')
.replace('/community/', 'https://github.com/akeneo/pim-community-dev/blob/master/')}
>
<IconButton
size="small"
ghost="borderless"
level="tertiary"
icon={<ViewIcon />}
title="Open in github"
/>
</a>
<Spacer />
{'directory' === child.type && (
<Badge>
Expand Down

0 comments on commit e786e7b

Please sign in to comment.