Skip to content

Commit 76f10d4

Browse files
committed
Cleanup
1 parent 18677ba commit 76f10d4

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

packages/playground/website/src/components/github-private-repo-auth-modal/index.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ export function GitHubPrivateRepoAuthModal() {
1212
const dispatch = useAppDispatch();
1313
const repoUrl = useAppSelector((state) => state.ui.githubAuthRepoUrl);
1414

15-
const githubUrl = repoUrl ? staticAnalyzeGitHubURL(repoUrl) : null;
16-
const displayRepoName =
17-
githubUrl?.owner && githubUrl.repo
18-
? `${githubUrl.owner}/${githubUrl.repo}`
19-
: repoUrl || '';
15+
if (!repoUrl) {
16+
return null;
17+
}
18+
19+
const { owner, repo } = staticAnalyzeGitHubURL(repoUrl);
20+
const displayRepoName = owner && repo ? `${owner}/${repo}` : repoUrl;
2021

21-
// Remove the modal parameter from the redirect URI
22-
// so it doesn't persist after OAuth completes
2322
const redirectUrl = new URL(window.location.href);
2423
redirectUrl.searchParams.delete('modal');
2524

packages/playground/website/src/lib/types.d.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,3 @@ declare module 'virtual:website-config' {
33
export const remotePlaygroundOrigin: string;
44
export const buildVersion: string;
55
}
6-
7-
// Defined in vite.config.ts
8-
declare module 'virtual:cors-proxy-url' {
9-
export const corsProxyUrl: string;
10-
}

0 commit comments

Comments
 (0)