Skip to content

Commit f6c02d6

Browse files
committed
chore: move spline API keys to env
1 parent a35e39e commit f6c02d6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/app/[locale]/_components/MainContainer.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import Spline from '@splinetool/react-spline'
1919
// loading: () => <LoadingCircle />
2020
// })
2121

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!
2424

2525
const MainContainer = () => {
2626
const params = useParams()
@@ -86,15 +86,15 @@ const MainContainer = () => {
8686

8787
const onLoad = (spline: Application) => {
8888
splineRef.current = spline
89-
const botObj = spline.findObjectByName(SPLINE_BOT_ID)
89+
const botObj = spline.findObjectByName(splitBotId)
9090
botObj?.emitEvent('mouseDown')
9191
if (botObj) botRef.current = botObj
9292
}
9393

9494
const toggleChat = () => {
9595
!!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)
9898
setIsBotChatOpened(!isBotChatOpened)
9999
}
100100

@@ -106,7 +106,7 @@ const MainContainer = () => {
106106
className="fixed w-full h-full
107107
flex justify-center items-center z-30 pointer-events-auto bg-gradient-to-tl from-primary to-primary/60"
108108
>
109-
<Spline scene={SPLINE_SCENE} onLoad={onLoad} />
109+
<Spline scene={scene} onLoad={onLoad} />
110110
</div>
111111

112112
<div

0 commit comments

Comments
 (0)