oops2
Deploy / deploy (push) Successful in 3m12s

This commit is contained in:
twotalesanimation
2026-08-01 17:51:33 +02:00
parent e91e7bf95d
commit 404daa081e
3 changed files with 221 additions and 17 deletions
+6 -1
View File
@@ -12,7 +12,7 @@ export default function ProjectsPage() {
const [search, setSearch] = useState("");
const [showNew, setShowNew] = useState(false);
const { data, isLoading } = useQuery({
const { data, isLoading, isError } = useQuery({
queryKey: ["projects", search],
queryFn: async () => {
const res = await fetch(`/api/projects?q=${encodeURIComponent(search)}`);
@@ -80,6 +80,11 @@ export default function ProjectsPage() {
<div className="flex justify-center py-12">
<Loader2 className="h-6 w-6 animate-spin text-muted-foreground" />
</div>
) : isError ? (
<div className="text-center py-12 text-muted-foreground">
<p>Could not load projects.</p>
<p className="text-xs mt-2">Check server logs and database connectivity, then refresh.</p>
</div>
) : projects.length === 0 ? (
<div className="text-center py-12 text-muted-foreground">
<p>No projects found.</p>