File tree Expand file tree Collapse file tree 1 file changed +19
-22
lines changed
app/[lang]/(hyperjump)/case-studies/[slug]/components Expand file tree Collapse file tree 1 file changed +19
-22
lines changed Original file line number Diff line number Diff line change 11"use client" ;
22
33import { Button } from "@/components/ui/button" ;
4- import { ArrowRightIcon } from "lucide-react" ;
4+
5+ type GetInTouchButtonProps = {
6+ index : string ;
7+ buttonChatbotMessage : string ;
8+ children : React . ReactNode ;
9+ } ;
10+
11+ function getTopic ( index : string ) : string {
12+ switch ( index ) {
13+ case "erp-fisheries" :
14+ return "Transforming a fisheries tech team into a scalable product engine" ;
15+ case "ctoaas-media" :
16+ return "Elevating a media-tech engineering team from feature factory to innovation powerhouse" ;
17+ default :
18+ return "" ;
19+ }
20+ }
521
622export default function ButtonGetInTouch ( {
723 index,
824 buttonChatbotMessage,
925 children
10- } : {
11- index : string ;
12- children : React . ReactNode ;
13- buttonChatbotMessage : string ;
14- } ) {
26+ } : GetInTouchButtonProps ) {
1527 return (
1628 < Button
1729 variant = "default"
1830 size = "lg"
1931 className = "bg-hyperjump-blue hover:bg-hyperjump-blue/90 w-3/4 md:w-auto"
2032 onClick = { ( ) => {
21- // Open Chatbot with question regarding the index of the Study Case
22- let topic = "" ;
23- switch ( index ) {
24- case "erp-fisheries" :
25- topic =
26- "Transforming a fisheries tech team into a scalable product engine" ;
27- break ;
28- case "ctoaas-media" :
29- topic =
30- "Elevating a media-tech engineering team from feature factory to innovation powerhouse" ;
31- break ;
32- default :
33- break ;
34- }
35-
3633 window . dispatchEvent (
3734 new CustomEvent ( "prefillAIAgent" , {
3835 detail : {
39- message : `${ buttonChatbotMessage } ${ topic } `
36+ message : `${ buttonChatbotMessage } ${ getTopic ( index ) } `
4037 }
4138 } )
4239 ) ;
You can’t perform that action at this time.
0 commit comments