Skip to content

Commit 45346e4

Browse files
authored
fix githiub lionmk (codesandbox#3626)
1 parent be9b88e commit 45346e4

File tree

1 file changed

+21
-7
lines changed
  • packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/GitHub

1 file changed

+21
-7
lines changed

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/GitHub/index.tsx

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
import React, { useEffect } from 'react';
2-
import { Collapsible, Text, Element, Stack } from '@codesandbox/components';
2+
import {
3+
Collapsible,
4+
Text,
5+
Element,
6+
Stack,
7+
Link,
8+
} from '@codesandbox/components';
9+
import { githubRepoUrl } from '@codesandbox/common/lib/utils/url-generator';
310
import { useOvermind } from 'app/overmind';
411
import { GitHubIcon } from './Icons';
512
import { CommitForm } from './CommitForm';
@@ -23,6 +30,7 @@ export const GitHub = () => {
2330
user,
2431
},
2532
} = useOvermind();
33+
2634
useEffect(() => {
2735
gitMounted();
2836
}, [gitMounted]);
@@ -42,12 +50,18 @@ export const GitHub = () => {
4250
{originalGit ? (
4351
<Collapsible title="Github" defaultOpen>
4452
<Element paddingX={2}>
45-
<Stack gap={2} marginBottom={6} align="center">
46-
<GitHubIcon />
47-
<Text size={2}>
48-
{originalGit.username}/{originalGit.repo}
49-
</Text>
50-
</Stack>
53+
<Link
54+
target="_blank"
55+
rel="noopener noreferrer"
56+
href={githubRepoUrl(originalGit)}
57+
>
58+
<Stack gap={2} marginBottom={6} align="center">
59+
<GitHubIcon />
60+
<Text size={2}>
61+
{originalGit.username}/{originalGit.repo}
62+
</Text>
63+
</Stack>
64+
</Link>
5165
</Element>
5266
<Element>
5367
<Text size={3} block marginBottom={2} marginX={2}>

0 commit comments

Comments
 (0)