refactor: address adversarial widget architecture review
This commit is contained in:
1 parent
0ca62f1232
commit
9bf266935b
42 files changed
+460
-578
No files matched your search
@@ -7,8 +7,11 @@ import { createTrpcQueryKey } from "../trpc-query-key";
|
||||
|
||||
const logger = createLogger({ module: "appWidgetPrefetch" });
|
||||
|
||||
const prefetchAllAsync: Prefetch<"app"> = async (queryClient, items) => {
|
||||
const appIds = items.map((item) => item.options.appId);
|
||||
const prefetchAllAsync: Prefetch = async (queryClient, items) => {
|
||||
const appIds: string[] = [];
|
||||
for (const item of items) {
|
||||
if (typeof item.options.appId === "string") appIds.push(item.options.appId);
|
||||
}
|
||||
const distinctAppIds = [...new Set(appIds)];
|
||||
|
||||
const dbApps = await db.query.apps.findMany({
|
||||
|
||||
Reference in new issue
Block a user