diff --git a/src/routes/app/+layout.svelte b/src/routes/app/+layout.svelte index a20b2ca19..ef8982a61 100644 --- a/src/routes/app/+layout.svelte +++ b/src/routes/app/+layout.svelte @@ -19,7 +19,7 @@ DocumentCloud - + diff --git a/src/routes/app/+layout.ts b/src/routes/app/+layout.ts index c858a51b0..51c4f1551 100644 --- a/src/routes/app/+layout.ts +++ b/src/routes/app/+layout.ts @@ -1,16 +1,8 @@ import { getPinnedAddons } from "@/lib/api/addons"; export async function load({ url, fetch }) { - const { pathname } = url; - console.log(pathname); const pinnedAddons = getPinnedAddons(fetch); - const isAddOnRoute = pathname.match(/\/app\/add-ons\/?/); - const isProjectRoute = pathname.match(/\/app\/projects\/?/); - const basement = isAddOnRoute ? "right" : isProjectRoute ? "left" : null; return { pinnedAddons, - isAddOnRoute, - isProjectRoute, - basement, }; } diff --git a/src/routes/app/add-ons/+page.svelte b/src/routes/app/add-ons/+page.svelte index 2357e95e6..6c76263b0 100644 --- a/src/routes/app/add-ons/+page.svelte +++ b/src/routes/app/add-ons/+page.svelte @@ -10,6 +10,7 @@ import Pin from "@/common/icons/Pin.svelte"; import Star from "@/common/icons/Star.svelte"; import Credit from "@/common/icons/Credit.svelte"; + import type { Page } from "@/api/types/common.js"; let per_page = 10; @@ -21,20 +22,18 @@ filter: $filter, }); $: url = buildUrl(urlParams); - $: next_url = data.addons.next ? new URL(data.addons.next).toString() : null; - $: previous_url = data.addons.previous - ? new URL(data.addons.previous).toString() - : null; - $: items = data.addons.results; - + $: next_url = res.next ? new URL(res.next).toString() : null; + $: previous_url = res.previous ? new URL(res.previous).toString() : null; + $: items = res.results; /** Network logic */ let loading = false; let error = null; + let res: Page; export async function load(url) { loading = true; - data = await fetch(url, { + res = await fetch(url, { credentials: "include", }) .then(async (r) => { @@ -86,9 +85,7 @@

{$_("addonBrowserDialog.premiumTip")}

{/if} - {#await data.addons then res} - - {/await} +