chore(frontend): clean up imports + packages
This commit is contained in:
parent
cafebec8ec
commit
f790c57447
12 changed files with 14 additions and 355 deletions
|
@ -1,3 +0,0 @@
|
|||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
|
@ -1,6 +1,4 @@
|
|||
<script lang="ts">
|
||||
import { Card, CardHeader, CardTitle, ListGroup, ListGroupItem } from "sveltestrap";
|
||||
|
||||
import type { Field } from "$lib/api/entities";
|
||||
|
||||
import StatusIcon from "./StatusIcon.svelte";
|
||||
|
|
|
@ -4,7 +4,7 @@ import type { APIError } from "$lib/api/entities";
|
|||
import { apiFetch } from "$lib/api/fetch";
|
||||
import type { MetaResponse } from "$lib/api/responses";
|
||||
|
||||
export const load = (async (event) => {
|
||||
export const load = (async () => {
|
||||
try {
|
||||
return await apiFetch<MetaResponse>("/meta", {});
|
||||
} catch (e) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { APIError, MeUser } from "$lib/api/entities";
|
||||
import { apiFetch } from "$lib/api/fetch";
|
||||
import type { PageServerLoad, Actions } from "./$types";
|
||||
import type { PageServerLoad } from "./$types";
|
||||
import { PUBLIC_BASE_URL } from "$env/static/public";
|
||||
|
||||
export const load = (async ({ url }) => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts">
|
||||
import { WordStatus, type Field } from "$lib/api/entities";
|
||||
import IconButton from "$lib/components/IconButton.svelte";
|
||||
import { Button, Input, InputGroup, InputGroupText } from "sveltestrap";
|
||||
import { Button, Input, InputGroup } from "sveltestrap";
|
||||
import FieldEntry from "./FieldEntry.svelte";
|
||||
|
||||
export let field: Field;
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
import {
|
||||
ErrorCode,
|
||||
type APIError,
|
||||
type Invite,
|
||||
type MeUser,
|
||||
type PartialMember,
|
||||
} from "$lib/api/entities";
|
||||
import { ErrorCode, type APIError, type Invite, type MeUser } from "$lib/api/entities";
|
||||
import { apiFetchClient } from "$lib/api/fetch";
|
||||
import type { LayoutLoad } from "./$types";
|
||||
|
||||
|
@ -12,7 +6,6 @@ export const ssr = false;
|
|||
|
||||
export const load = (async ({ parent }) => {
|
||||
const user = await apiFetchClient<MeUser>("/users/@me");
|
||||
const members = await apiFetchClient<PartialMember[]>("/users/@me/members");
|
||||
|
||||
let invites: Invite[] = [];
|
||||
let invitesEnabled = true;
|
||||
|
@ -29,7 +22,6 @@ export const load = (async ({ parent }) => {
|
|||
return {
|
||||
...data,
|
||||
user,
|
||||
members,
|
||||
invites,
|
||||
invitesEnabled,
|
||||
};
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Members</th>
|
||||
<td>{data.members.length}/{MAX_MEMBERS}</td>
|
||||
<td>{data.user.members.length}/{MAX_MEMBERS}</td>
|
||||
</tr>
|
||||
{#if data.invitesEnabled}
|
||||
<tr>
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
export let data: PageData;
|
||||
|
||||
import * as jose from "jose";
|
||||
const claims = jose.decodeJwt(localStorage.getItem("pronouns-token")!);
|
||||
import { decodeJwt } from "jose";
|
||||
const claims = decodeJwt(localStorage.getItem("pronouns-token")!);
|
||||
</script>
|
||||
|
||||
<h1>Tokens ({data.tokens.length})</h1>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue