@@ -500,6 +500,9 @@ const Panel = () => {
500500 return [ ...( results ?. errors ?? [ ] ) , ...replacementErrors ]
501501 } , [ replacementErrors , results ?. errors ] )
502502
503+ const subscribeLinkRef = useRef < any > ( )
504+ const nameLinkRef = useRef < any > ( )
505+
503506 return (
504507 < Providers >
505508 < Flex height = "98vh" flexDir = "column" maxWidth = "100wv" >
@@ -544,6 +547,23 @@ const Panel = () => {
544547 />
545548 ) }
546549 < Banners />
550+ { /* This link is hidden and we click it imperatively. For some reason clicking link inside modal does not work */ }
551+ < Link
552+ ref = { subscribeLinkRef }
553+ my = "1"
554+ href = "https://jayu.dev/newsletter?utm_source=vscode_proModal"
555+ display = { 'none' }
556+ >
557+ Subscribe to book 17€* early bird price 💸
558+ </ Link >
559+ < Link
560+ ref = { nameLinkRef }
561+ my = "1"
562+ href = "https://twitter.com/jayu_dev"
563+ display = { 'none' }
564+ >
565+ Jakub Twitter account
566+ </ Link >
547567 < SearchResultsList
548568 isLoading = { isSearching }
549569 matches = { results ?. matches ?? [ ] }
@@ -559,6 +579,7 @@ const Panel = () => {
559579 isWorkspace = { isWorkspace }
560580 />
561581 </ Flex >
582+
562583 < Flex >
563584 < Modal isOpen = { proModalVisible } onClose = { closeProModal } >
564585 < ModalOverlay />
@@ -573,7 +594,13 @@ const Panel = () => {
573594 < ModalBody display = "flex" flexDirection = "column" gap = "6px" >
574595 < Text >
575596 Hey 👋{ ' ' }
576- < Link onClick = { nameClickProModal } textDecoration = "underline" >
597+ < Link
598+ onClick = { ( ) => {
599+ nameClickProModal ( )
600+ nameLinkRef . current ?. click ( )
601+ } }
602+ textDecoration = "underline"
603+ >
577604 Jakub
578605 </ Link > { ' ' }
579606 here.
@@ -616,7 +643,14 @@ const Panel = () => {
616643 </ ModalBody >
617644
618645 < ModalFooter >
619- < Button colorScheme = "purple" mr = { 3 } onClick = { ctaClickProModal } >
646+ < Button
647+ colorScheme = "purple"
648+ mr = { 3 }
649+ onClick = { ( ) => {
650+ ctaClickProModal ( )
651+ subscribeLinkRef . current ?. click ( )
652+ } }
653+ >
620654 Subscribe to book 17€* early bird price 💸
621655 </ Button >
622656 </ ModalFooter >
0 commit comments