Skip to content

Commit 8da3322

Browse files
committed
feat(app/sidebar): open in meta quest button
1 parent fa91639 commit 8da3322

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

app/src/components/ui/settings/layout.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { PropsWithChildren, ReactNode } from 'react'
22

33
import { Container, Text } from '@react-three/uikit'
44
import { Button, Card, colors, Separator } from '@react-three/uikit-default'
5-
import { GithubIcon, PanelLeftIcon } from '@react-three/uikit-lucide'
5+
import { ExternalLinkIcon, GithubIcon, PanelLeftIcon } from '@react-three/uikit-lucide'
66
import { useState } from 'react'
77

88
import { ToggleColorSchemeButton } from '~/components/ui/toggle-color-scheme-button'
@@ -34,8 +34,21 @@ export const SettingsLayout = ({ children, sidebar, title }: PropsWithChildren<S
3434
{sidebar}
3535
<Container flexGrow={1} />
3636
<Button disabled justifyContent="flex-start" marginBottom={-8} variant="ghost">
37-
<Text fontSize={12} fontWeight={600}>Community</Text>
37+
<Text fontSize={12} fontWeight={600}>Extra</Text>
3838
</Button>
39+
{import.meta.env.PROD && (
40+
<Button
41+
data-test-id="oculus-open-url"
42+
gap={8}
43+
hover={{ backgroundColor: colors.card }}
44+
justifyContent="flex-start"
45+
onClick={() => window.open(`https://www.oculus.com/open_url/?url=${encodeURIComponent(window.location.href)}`, '_blank', 'noopener')}
46+
variant="ghost"
47+
>
48+
<ExternalLinkIcon height={16} width={16} />
49+
<Text>Open in Meta Quest</Text>
50+
</Button>
51+
)}
3952
<Button
4053
data-test-id="github"
4154
gap={8}

0 commit comments

Comments
 (0)