CLASSROOMIO-T-80: Replace sapper with sveltekit

This commit is contained in:
Rotimi Best
2023-08-02 19:35:27 +01:00
parent 8ffdf319b3
commit 7dfbb05451
320 changed files with 5207 additions and 18330 deletions
@@ -0,0 +1,24 @@
<script lang="ts">
// import { ROLE } from '$lib/utils/constants/roles';
import { profile } from '$lib/utils/store/user';
import { group } from '../Course/store';
import type { Person } from '../Course/components/People/types';
export let allowedRoles: number[] = [];
let userRole: number = 0;
$: {
const user: Person = $group.people.find(
(person: { profile_id: number }) => person.profile_id === $profile.id
)!;
if (user) {
userRole = user.role_id;
}
}
</script>
{#if allowedRoles.includes(userRole)}
<slot />
{/if}
@@ -0,0 +1 @@
import { writable } from 'svelte/store';