Skip to content

Commit

Permalink
feat: loading screen
Browse files Browse the repository at this point in the history
  • Loading branch information
yongenaelf committed Jul 29, 2024
1 parent 1177cc7 commit 208331b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions app/github.com/[user]/[repo]/tree/[branch]/[...path]/loading.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Skeleton } from "@/components/ui/skeleton";

export default function Loading() {
return (
<div className="container px-4 py-12 md:px-6 lg:py-16">
<h1 className="text-2xl mb-2">Import GitHub repository</h1>
<Skeleton className="h-5 w-20 mb-2 rounded-md bg-muted" />
<Skeleton className="h-10 mb-2 w-full rounded-md bg-muted" />
<Skeleton className="h-5 w-48 mb-8 rounded-md bg-muted" />
<Skeleton className="h-5 w-20 mb-2 rounded-md bg-muted" />
<Skeleton className="h-10 mb-2 w-full rounded-md bg-muted" />
<Skeleton className="h-5 w-48 mb-8 rounded-md bg-muted" />
<Skeleton className="h-10 w-20 mb-2 rounded-md bg-muted" />
</div>
);
}
2 changes: 1 addition & 1 deletion components/repo-url-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function RepoUrlForm() {
async function onSubmit(data: z.infer<typeof FormSchema>) {
form.clearErrors();
try {
await router.push(`/${data.url}`);
await router.push(`/${data.url.replace("https://", "")}`);
} catch (err) {
form.setError("url", { message: String(err) });
}
Expand Down

0 comments on commit 208331b

Please sign in to comment.