Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 625 Bytes
a1d7896 3d344de a1d7896 f05d33c a1d7896 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
<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) => {
e.preventDefault();
e.stopPropagation();
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 block"
on:click={handleClick}
>
<div class:pointer-events-none={!user}>
<slot />
</div>
</div> |