Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit 9f2fdce

Browse files
author
Noah Lee
authored
Fix the target attr for the external links (#355)
* Add target attr to the external links * Fix errors for react `key`
1 parent 984136a commit 9f2fdce

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

ui/src/components/DeployConfirm.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,13 @@ function CommitChange(props: CommitChangeProps): JSX.Element {
171171

172172
return (
173173
<span >
174-
<a href={props.commit.htmlUrl} className="gitploy-link"><strong>{message}</strong></a>
174+
<a
175+
href={props.commit.htmlUrl}
176+
target="_blank"
177+
className="gitploy-link"
178+
>
179+
<strong>{message}</strong>
180+
</a>
175181
{(description.length) ?
176182
<Button size="small" type="text" onClick={onClickHide}>
177183
<Text className="gitploy-code" code>...</Text>

ui/src/components/DeploymentStatusSteps.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ export default function DeploymentStatusSteps(props: DeploymentStatusStepsProps)
1515
{props.statuses.map((status, idx) => {
1616
return (
1717
<Timeline.Item
18+
key={idx}
1819
color={getStatusColor(status.status)}
1920
style={(idx === props.statuses.length - 1)? {paddingBottom: 0} : {}}
2021
>
2122
<Paragraph style={{margin: 0}}>
2223
<Text strong>{status.description}</Text>
23-
{(status.logUrl !== "")? <Link href={status.logUrl}> View</Link> : <></>}<br/>
24+
{(status.logUrl !== "")? <Link href={status.logUrl} target="_blank"> View</Link> : <></>}<br/>
2425
<Text>Updated</Text> <Text code className="gitploy-code">{status.status}</Text> <Text>at {moment(status.createdAt).format('HH:mm:ss')}</Text>
2526
</Paragraph>
2627
</Timeline.Item>

ui/src/views/Deployment.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,7 @@ export default function DeploymentView(): JSX.Element {
146146
<Breadcrumb.Item>Deployments</Breadcrumb.Item>
147147
<Breadcrumb.Item>{number}</Breadcrumb.Item>
148148
</Breadcrumb>}
149-
extra={[
150-
reviewBtn,
151-
]}
149+
extra={reviewBtn}
152150
onBack={onBack}
153151
/>
154152
</div>

0 commit comments

Comments
 (0)