Added catalog generation, need to bug fix

This commit is contained in:
Kevin FEDYNA
2025-01-15 10:15:02 +01:00
parent ccad788e19
commit eea49969b5
17 changed files with 248 additions and 99 deletions
+27
View File
@@ -0,0 +1,27 @@
export interface AppProperties {
name: string;
icon: string;
}
type AppNavigatorProps = Record<string | number | symbol, never>;
export default async function AppNavigator(_props: AppNavigatorProps) {
const apps: Record<string, AppProperties> = {};
for await (const appDir of Deno.readDir("../(apps)")) {
try {
const properties: AppProperties = await import(`../(apps)/${appDir.name}/(_props)/props.ts`);
apps[appDir.name] = properties;
}
catch (error) {
console.error(`Couldn't import app "${appDir.name}": ${error}`);
}
}
return (
<>
<p>{JSON.stringify(apps)}</p>
</>
);
}