diff --git a/src/lib/CardsHeader.svelte b/src/lib/CardsHeader.svelte index 00b34986..b2c123a9 100644 --- a/src/lib/CardsHeader.svelte +++ b/src/lib/CardsHeader.svelte @@ -2,9 +2,8 @@ import { Modal, CardHeader, CardTitle, Image } from 'sveltestrap'; import FaUserCircle from 'svelte-icons/fa/FaUserCircle.svelte' import default_avatar from '../assets/default_avatar.png'; - import type Sys from '../api/system'; - export let item: Sys; + export let item: any; let avatarOpen = false; const toggleAvatarModal = () => (avatarOpen = !avatarOpen); diff --git a/src/lib/system/Body.svelte b/src/lib/system/Body.svelte index 589648b3..a6777bbd 100644 --- a/src/lib/system/Body.svelte +++ b/src/lib/system/Body.svelte @@ -2,8 +2,9 @@ import { Row, Col, Modal, Image, Button } from 'sveltestrap'; import moment from 'moment'; import { toHTML } from 'discord-markdown'; + import type Sys from '../../api/system'; - export let user; + export let user: Sys; export let editMode: boolean; let htmlDescription: string; diff --git a/src/lib/system/Main.svelte b/src/lib/system/Main.svelte index e890d739..a745f6ba 100644 --- a/src/lib/system/Main.svelte +++ b/src/lib/system/Main.svelte @@ -3,8 +3,9 @@ import CardsHeader from '../CardsHeader.svelte'; import SystemBody from './Body.svelte'; import SystemPrivacy from './Privacy.svelte'; + import type Sys from '../../api/system'; - export let user; + export let user: Sys; export let isPublic = true; let editMode = false; diff --git a/src/lib/system/Privacy.svelte b/src/lib/system/Privacy.svelte index a2f0de96..b56b1426 100644 --- a/src/lib/system/Privacy.svelte +++ b/src/lib/system/Privacy.svelte @@ -1,8 +1,9 @@ diff --git a/src/pages/Dash.svelte b/src/pages/Dash.svelte index a345d47a..6a5ee92e 100644 --- a/src/pages/Dash.svelte +++ b/src/pages/Dash.svelte @@ -5,7 +5,7 @@ import System from '../lib/system/Main.svelte'; import PKAPI from '../api'; - import type Sys from '../api/system'; + import Sys from '../api/system'; let isPublic = false; @@ -24,7 +24,7 @@ }); // if there is no cached user, get the user from localstorage - let user = current ? current : JSON.parse(localStorage.getItem("pk-user")); + let user = new Sys(current ? current : JSON.parse(localStorage.getItem("pk-user"))); // since the user in localstorage can be outdated, fetch the user from the api again if (!current) { login(localStorage.getItem("pk-token"));