File tree Expand file tree Collapse file tree 4 files changed +17
-6
lines changed
packages/components/src/components Expand file tree Collapse file tree 4 files changed +17
-6
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @theguild/components ' : patch
3
+ ---
4
+
5
+ Call event.preventDefault on Contact onClick only if $crisp is there
Original file line number Diff line number Diff line change @@ -28,8 +28,10 @@ export function GetYourAPIGameRightSection({ className }: { className?: string }
28
28
variant = "tertiary"
29
29
href = "https://the-guild.dev/contact"
30
30
onClick = { event => {
31
- window . $crisp ?. push ( [ 'do' , 'chat:open' ] ) ;
32
- event . preventDefault ( ) ;
31
+ if ( window . $crisp ) {
32
+ window . $crisp . push ( [ 'do' , 'chat:open' ] ) ;
33
+ event . preventDefault ( ) ;
34
+ }
33
35
} }
34
36
>
35
37
Talk to us
Original file line number Diff line number Diff line change @@ -59,8 +59,10 @@ export function HiveFooter({
59
59
className = "hive-focus -m-2 rounded p-2 font-medium hover:text-blue-700 hover:underline dark:hover:text-blue-100"
60
60
href = "https://the-guild.dev/contact"
61
61
onClick = { event => {
62
- window . $crisp ?. push ( [ 'do' , 'chat:open' ] ) ;
63
- event . preventDefault ( ) ;
62
+ if ( window . $crisp ) {
63
+ window . $crisp . push ( [ 'do' , 'chat:open' ] ) ;
64
+ event . preventDefault ( ) ;
65
+ }
64
66
} }
65
67
>
66
68
Contact Us
Original file line number Diff line number Diff line change @@ -165,8 +165,10 @@ export function HiveNavigation({
165
165
target = "_blank"
166
166
rel = "noopener noreferrer"
167
167
onClick = { event => {
168
- window . $crisp ?. push ( [ 'do' , 'chat:open' ] ) ;
169
- event . preventDefault ( ) ;
168
+ if ( window . $crisp ) {
169
+ window . $crisp . push ( [ 'do' , 'chat:open' ] ) ;
170
+ event . preventDefault ( ) ;
171
+ }
170
172
} }
171
173
>
172
174
Contact < span className = "hidden xl:contents" > us</ span >
You can’t perform that action at this time.
0 commit comments