import { ChevronRightIcon } from "lucide-react"; import { Link } from "react-router"; import { appStoreApps, getAppStoreUrl, } from "src/components/connections/SuggestedAppData"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "src/components/ui/card"; export function AppOfTheDayWidget() { function seededRandom(seed: number) { const x = Math.sin(seed) * 10000; return x - Math.floor(x); } // filter out apps which already have a widget const excludedAppIds = ["alby-go", "zapplanner"]; const apps = appStoreApps.filter((a) => !excludedAppIds.includes(a.id)); // eslint-disable-next-line react-hooks/purity const daysSinceEpoch = Math.floor(Date.now() / (1000 * 60 * 60 * 24)); const todayIndex = Math.floor(seededRandom(daysSinceEpoch) * apps.length); const app = apps[todayIndex]; return ( App of the Day {`${app.title}

{app.title}

{app.description}
); }