File tree Expand file tree Collapse file tree 1 file changed +21
-7
lines changed
packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/GitHub Expand file tree Collapse file tree 1 file changed +21
-7
lines changed Original file line number Diff line number Diff line change 11import 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' ;
310import { useOvermind } from 'app/overmind' ;
411import { GitHubIcon } from './Icons' ;
512import { 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 } >
You can’t perform that action at this time.
0 commit comments