Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
<script lang="ts"> | |
import { get } from "svelte/store"; | |
import { loginModalStore } from "$lib/stores/use-login-modal"; | |
import { userStore } from "$lib/stores/use-user"; | |
let user = get(userStore); | |
const handleClick = (e: any) => { | |
if (!user) { | |
loginModalStore.update(() => true); | |
} | |
}; | |
</script> | |
<!-- svelte-ignore a11y-no-static-element-interactions --> | |
<!-- svelte-ignore a11y-click-events-have-key-events --> | |
<div | |
class="w-full cursor-pointer" | |
on:click={handleClick} | |
> | |
<div class:pointer-events-none={!user}> | |
<slot /> | |
</div> | |
</div> |