File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
frontend/packages/data-portal/app/components Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,10 @@ export function ViewTomogramButton({
72
72
directly because Plausible will overwrite it. */ }
73
73
{ /* eslint-disable-next-line jsx-a11y/no-static-element-interactions */ }
74
74
< div
75
- onClick = { trackViewTomogram }
75
+ onClick = { ( e ) => {
76
+ e . stopPropagation ( )
77
+ trackViewTomogram ( )
78
+ } }
76
79
onKeyDown = { ( { key } ) => {
77
80
if ( key === 'Enter' ) {
78
81
trackViewTomogram ( )
@@ -83,12 +86,7 @@ export function ViewTomogramButton({
83
86
className = "min-w-[152px]"
84
87
>
85
88
< Button
86
- onClick = { ( e ) => {
87
- if ( enabled ) {
88
- e . stopPropagation ( )
89
- window . open ( getNeuroglancerUrl ( neuroglancerConfig ) , '_blank' )
90
- }
91
- } }
89
+ href = { enabled ? getNeuroglancerUrl ( neuroglancerConfig ) : undefined }
92
90
disabled = { ! enabled }
93
91
LinkComponent = { Link }
94
92
{ ...( buttonProps as ButtonProps ) }
You can’t perform that action at this time.
0 commit comments