Skip to content

Commit

Permalink
improve placeholder for no PRs found with better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
slavingia committed Sep 27, 2024
1 parent 4dd8176 commit 8d561c8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
20 changes: 15 additions & 5 deletions app/(dashboard)/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useState, useEffect } from "react";
import { Button } from "@/components/ui/button";
import { Loader2, AlertCircle } from "lucide-react";
import { Loader2, AlertCircle, GitPullRequest } from "lucide-react";
import { PullRequestItem } from "./pull-request";
import { PullRequest } from "./types";
import { getAssignedPullRequests } from "@/lib/github";
Expand Down Expand Up @@ -89,10 +89,10 @@ export default function DashboardPage() {
}

return (
<div className="space-y-6">
<div className="p-6">
<div className="space-y-6 h-full flex flex-col">
<div className="p-6 flex-grow flex items-center">
{pullRequests.length > 0 ? (
<ul className="space-y-8">
<ul className="space-y-8 w-full">
{pullRequests.map((pr) => (
<li key={pr.id}>
<div className="flex items-center justify-between mb-2">
Expand All @@ -105,7 +105,17 @@ export default function DashboardPage() {
))}
</ul>
) : (
<p>No pull requests found.</p>
<div className="w-full border-2 border-dashed border-gray-300 rounded-lg p-6">
<div className="flex flex-col items-center justify-center text-center">
<GitPullRequest className="h-16 w-16 text-gray-400 mb-4" />
<h3 className="text-xl font-semibold mb-2">
No pull requests found
</h3>
<p className="text-gray-600 mb-4">
We couldn't find any pull requests assigned to you.
</p>
</div>
</div>
)}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/(dashboard)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function HomePage() {
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="text-center">
<h1 className="text-4xl font-bold text-gray-900 tracking-tight sm:text-5xl md:text-6xl">
Write Your Tests
(Have AI) Write Your Tests
<span className="block text-orange-500">Faster Than Ever</span>
</h1>
<p className="mt-3 text-base text-gray-500 sm:mt-5 sm:text-xl lg:text-lg xl:text-xl max-w-2xl mx-auto">
Expand Down

0 comments on commit 8d561c8

Please sign in to comment.