Skip to content

Commit

Permalink
feat: link to check file url
Browse files Browse the repository at this point in the history
  • Loading branch information
gjgd committed Jul 6, 2020
1 parent 2c20420 commit d62a983
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/app/src/components/FilesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,9 @@ const EnhancedTable: React.FunctionComponent<{ files: Array<Data> }> = ({
const isItemSelected = isSelected(row.path);
const fileState = isValid(row.path);
const labelId = `enhanced-table-checkbox-${index}`;
const rawUrl = `${toRawGithubUrl(row.path)}`;
const checkFileUrl = `${
window.location.origin
}?url=${toRawGithubUrl(row.path)}&tab=1&analyze=1`;
let Icon;
if (fileState === FileState.Valid) {
Icon = <Done style={{ color: 'green' }} />;
Expand Down Expand Up @@ -455,7 +457,13 @@ const EnhancedTable: React.FunctionComponent<{ files: Array<Data> }> = ({
{row.path}
</TableCell>
<TableCell>
<a href={rawUrl}>{rawUrl}</a>
<a
target="_blank"
rel="noopener noreferrer"
href={checkFileUrl}
>
{checkFileUrl}
</a>
</TableCell>
<TableCell>{Icon}</TableCell>
</TableRow>
Expand Down

0 comments on commit d62a983

Please sign in to comment.