From f9dc834202de5afdf1ef47d10ad674ed09456525 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 13 Dec 2024 15:19:53 +0000 Subject: [PATCH] Update other usages of auth store --- packages/builder/src/stores/portal/apps.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/stores/portal/apps.ts b/packages/builder/src/stores/portal/apps.ts index 4e673fc129..867a554f00 100644 --- a/packages/builder/src/stores/portal/apps.ts +++ b/packages/builder/src/stores/portal/apps.ts @@ -4,7 +4,7 @@ import { AppStatus } from "constants" import { API } from "api" import { auth } from "./auth" import BudiStore from "../BudiStore" -import { App, UpdateAppRequest, User } from "@budibase/types" +import { App, UpdateAppRequest } from "@budibase/types" interface AppIdentifierMetadata { devId?: string @@ -174,7 +174,7 @@ export class AppsStore extends BudiStore { export const appsStore = new AppsStore() export const sortBy = derived([appsStore, auth], ([$store, $auth]) => { - return $store.sortBy || ($auth.user as User | null)?.appSort || "name" + return $store.sortBy || $auth.user?.appSort || "name" }) // Centralise any logic that enriches the apps list @@ -182,7 +182,7 @@ export const enrichedApps = derived( [appsStore, auth, sortBy], ([$store, $auth, $sortBy]) => { const enrichedApps: EnrichedApp[] = $store.apps.map(app => { - const user = $auth.user as User | null + const user = $auth.user return { ...app, deployed: app.status === AppStatus.DEPLOYED,