import React from "react"; import { useAppSubmissions } from "@/hooks/useAppSubmissions"; import { AppShowcaseCard } from "@/components/AppShowcaseCard"; import { Skeleton } from "@/components/ui/skeleton"; import { Card, CardContent } from "@/components/ui/card"; import { useAppContext } from "@/hooks/useAppContext"; import { useTranslation } from 'react-i18next'; import { Button } from "@/components/ui/button"; import { Link } from 'react-router-dom'; import { Settings } from 'lucide-react'; export function AppShowcase() { const { t } = useTranslation(); const { config } = useAppContext(); const { data: submissions = [], isLoading } = useAppSubmissions(); // Don't show showcase if disabled in settings if (!config.showcaseEnabled) { return null; } if (isLoading) { return (
{Array.from({ length: 6 }).map((_, i) => (
))}
); } if (!submissions.length) { return (

{t('noAppsFound')}

); } return (
{submissions.map((app) => ( ))}
); }