Files
PolyMPR/routes/(_islands)/AppNavigator.tsx
T
Kevin FEDYNA b894930e12 Fix after MR
2025-01-15 15:57:08 +01:00

30 lines
647 B
TypeScript

import { AppProperties } from "$root/defaults/interfaces.ts";
import AppCard from "$root/routes/(_components)/AppCard.tsx";
type AppNavigatorProps = {
apps: Record<string, AppProperties>;
};
export default function AppNavigator(props: AppNavigatorProps) {
if (!props.apps) {
return (
<>
<h2>Welcome to PolyMPR!</h2>
<p>No apps available.</p>
</>
);
}
return (
<>
<h2>Welcome to PolyMPR!</h2>
<h3>app list</h3>
<div className="app-list">
{Object.entries(props.apps).map(([key, app]) => (
<AppCard href={key} app={app} />
))}
</div>
</>
);
}