Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/pmndrs/xr
Browse files Browse the repository at this point in the history
  • Loading branch information
bbohlender committed Dec 6, 2024
2 parents 3798fe1 + b3d60aa commit 555c503
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/tutorials/guards.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Guards allow to conditionally display or include content. For instance, the `IfI

```tsx
import { Canvas } from '@react-three/fiber'
import { XR, createXRStore } from '@react-three/xr'
import { IfInSessionMode, XR, createXRStore } from '@react-three/xr'

const store = createXRStore()

Expand All @@ -18,9 +18,9 @@ export function App() {
<button onClick={() => store.enterAR()}>Enter AR</button>
<Canvas>
<XR store={store}>
<SessionModeGuard deny="immersive-ar">
<IfInSessionMode deny="immersive-ar">
<color args={['red']} attach="background" />
</SessionModeGuard>
</IfInSessionMode>
</XR>
</Canvas>
</>
Expand Down

0 comments on commit 555c503

Please sign in to comment.