fetch user profile (wip)
This commit is contained in:
@@ -1,25 +1,24 @@
|
||||
<script>
|
||||
import { browser } from '$app/environment';
|
||||
import { onMount, onDestroy } from 'svelte';
|
||||
import { initCursorTracking, stopCursorTracking } from '../events/cursor';
|
||||
import { browser } from "$app/environment";
|
||||
import { onMount, onDestroy } from "svelte";
|
||||
import { initCursorTracking, stopCursorTracking } from "../events/cursor";
|
||||
|
||||
let { children } = $props();
|
||||
if (browser) {
|
||||
onMount(async () => {
|
||||
try {
|
||||
await initCursorTracking();
|
||||
} catch (err) {
|
||||
console.error("[Scene] Failed to initialize cursor tracking:", err);
|
||||
}
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
stopCursorTracking();
|
||||
});
|
||||
}
|
||||
let { children } = $props();
|
||||
if (browser) {
|
||||
onMount(async () => {
|
||||
try {
|
||||
await initCursorTracking();
|
||||
} catch (err) {
|
||||
console.error("[Scene] Failed to initialize cursor tracking:", err);
|
||||
}
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
stopCursorTracking();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="size-full bg-transparent">
|
||||
{@render children?.()}
|
||||
{@render children?.()}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user