Skip to content

Commit 33dd1f0

Browse files
committed
add view for no prs
1 parent 9af114a commit 33dd1f0

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/renderer/ApiTokenSetup.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ function ApiTokenSetup({ remoteRepoPath, repositoryPath }: ApiTokenSetupProps) {
1313

1414
return (
1515
<div className="w-4/6 mx-auto mt-10">
16-
<h1 className="text-2xl text-gray-800 font-medium">
16+
<h1 className="text-2xl text-gray-800">
1717
Set up a GitHub API token for{' '}
18-
<span className="font-normal">{remoteRepoPath}</span>
18+
<span className="font-medium">{remoteRepoPath}</span>
1919
</h1>
2020
<div className="mt-4 text-gray-800">
2121
<div className="font-medium mb-3">1. Create an API token</div>

src/renderer/PullRequestList.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export default function PullRequestList({
7171
</div>
7272
)}
7373
{data?.result === 'OK' &&
74+
!!data.pullRequests.length &&
7475
data.pullRequests.map((pr) => (
7576
<PullRequestListItem
7677
key={pr.url}
@@ -79,6 +80,21 @@ export default function PullRequestList({
7980
{...pr}
8081
/>
8182
))}
83+
{data?.result === 'OK' && !data.pullRequests.length && (
84+
<div className="flex items-center justify-center h-[85vh] flex-col">
85+
<div className="text-2xl text-gray-600 font-normal">
86+
You have no open pull requests in{' '}
87+
<span className="font-medium">{data.remoteRepoPath}</span>
88+
</div>
89+
<div className="text-gray-400 mt-6 text-sm">
90+
Tip: Hit{' '}
91+
<div className="inline-block border px-[2px] border-gray-200 rounded">
92+
Command-R
93+
</div>{' '}
94+
to reload
95+
</div>
96+
</div>
97+
)}
8298
</div>
8399
)
84100
}

0 commit comments

Comments
 (0)