@@ -4,11 +4,14 @@ import {
44 Text ,
55} from '@react-three/uikit'
66import { Button , Defaults , Input } from '@react-three/uikit-default'
7- import { GithubIcon } from '@react-three/uikit-lucide'
7+ import { GithubIcon , SettingsIcon } from '@react-three/uikit-lucide'
88import { IfInSessionMode , useXRStore } from '@react-three/xr'
99
10+ import { useNavigate } from '~/router'
11+
1012export const Navbar = ( ) => {
1113 const store = useXRStore ( )
14+ const navigate = useNavigate ( )
1215
1316 return (
1417 < IfInSessionMode deny = { [ 'immersive-ar' , 'immersive-vr' ] } >
@@ -23,14 +26,6 @@ export const Navbar = () => {
2326 < Container flexDirection = "column" gap = { 8 } lg = { { flexDirection : 'row' } } >
2427 < Input maxWidth = { 256 } placeholder = "Send message..." />
2528 < Container gap = { 8 } justifyContent = "center" >
26- < Button
27- data-test-id = "github"
28- onClick = { ( ) => window . open ( 'https://github.com/moeru-ai/n3p6' , '_blank' , 'noopener' ) }
29- size = "icon"
30- variant = "secondary"
31- >
32- < GithubIcon height = { 16 } width = { 16 } />
33- </ Button >
3429 < Button
3530 data-test-id = "enter-vr"
3631 onClick = { ( ) => void store . enterVR ( ) }
@@ -45,6 +40,23 @@ export const Navbar = () => {
4540 >
4641 < Text > Enter AR</ Text >
4742 </ Button >
43+ < Button
44+ data-test-id = "settings"
45+ // eslint-disable-next-line ts/no-misused-promises
46+ onClick = { async ( ) => navigate ( '/settings' ) }
47+ size = "icon"
48+ variant = "secondary"
49+ >
50+ < SettingsIcon height = { 16 } width = { 16 } />
51+ </ Button >
52+ < Button
53+ data-test-id = "github"
54+ onClick = { ( ) => window . open ( 'https://github.com/moeru-ai/n3p6' , '_blank' , 'noopener' ) }
55+ size = "icon"
56+ variant = "secondary"
57+ >
58+ < GithubIcon height = { 16 } width = { 16 } />
59+ </ Button >
4860 </ Container >
4961 </ Container >
5062 </ Fullscreen >
0 commit comments