Skip to content

Scheduling infrastructure for absolutely everyone.

Don't display uninstalled apps (#2405)

Omar López0e93af912e17
diff --git a/packages/app-store/_appRegistry.ts b/packages/app-store/_appRegistry.ts
index 813ba466a3c..978631581f6 100644
--- a/packages/app-store/_appRegistry.ts
+++ b/packages/app-store/_appRegistry.ts
@@ -4,9 +4,12 @@ import appStore from ".";
/** Mainly to use in listings for the frontend, use in getStaticProps or getServerSideProps */
export function getAppRegistry() {
- return Object.values(appStore).map((app) => {
+ return Object.values(appStore).reduce((apps, app) => {
+ // Skip if app isn't installed
+ if (!app.metadata.installed) return apps;
// Let's not leak api keys to the front end
const { key, ...metadata } = app.metadata;
- return metadata;
- }) as App[];
+ apps.push(metadata);
+ return apps;
+ }, [] as Omit<App, "key">[]);
}