@@ -19,8 +19,8 @@ import Spline from '@splinetool/react-spline'
19
19
// loading: () => <LoadingCircle />
20
20
// })
21
21
22
- const SPLINE_SCENE = 'https://prod.spline.design/W83XdmrQbaQnPMlJ/scene.splinecode'
23
- const SPLINE_BOT_ID = '7a1937ee-e0ec-4da1-bca9-10b1ff105490'
22
+ const scene = process . env . NEXT_PUBLIC_SPLINE_SCENE !
23
+ const splitBotId = process . env . NEXT_PUBLIC_SPLINE_BOT_ID !
24
24
25
25
const MainContainer = ( ) => {
26
26
const params = useParams ( )
@@ -86,15 +86,15 @@ const MainContainer = () => {
86
86
87
87
const onLoad = ( spline : Application ) => {
88
88
splineRef . current = spline
89
- const botObj = spline . findObjectByName ( SPLINE_BOT_ID )
89
+ const botObj = spline . findObjectByName ( splitBotId )
90
90
botObj ?. emitEvent ( 'mouseDown' )
91
91
if ( botObj ) botRef . current = botObj
92
92
}
93
93
94
94
const toggleChat = ( ) => {
95
95
! ! isBotChatOpened
96
- ? splineRef . current ?. emitEventReverse ( 'mouseDown' , SPLINE_BOT_ID )
97
- : splineRef . current ?. emitEvent ( 'mouseDown' , SPLINE_BOT_ID )
96
+ ? splineRef . current ?. emitEventReverse ( 'mouseDown' , splitBotId )
97
+ : splineRef . current ?. emitEvent ( 'mouseDown' , splitBotId )
98
98
setIsBotChatOpened ( ! isBotChatOpened )
99
99
}
100
100
@@ -106,7 +106,7 @@ const MainContainer = () => {
106
106
className = "fixed w-full h-full
107
107
flex justify-center items-center z-30 pointer-events-auto bg-gradient-to-tl from-primary to-primary/60"
108
108
>
109
- < Spline scene = { SPLINE_SCENE } onLoad = { onLoad } />
109
+ < Spline scene = { scene } onLoad = { onLoad } />
110
110
</ div >
111
111
112
112
< div
0 commit comments