(data: z.infer<typeof formSchema>)
| 62 | return usernameRegex.test(trimmed); |
| 63 | }, "Please enter a valid GitHub username or profile URL"), |
| 64 | }); |
| 65 | |
| 66 | export function GithubFormFallback() { |
| 67 | return ( |
| 68 | <div className="flex w-full max-w-md flex-col items-center gap-5"> |
| 69 | <Skeleton className="h-8 w-3/4" /> |
| 70 | <Skeleton className="h-8 w-full" /> |
| 71 | </div> |
| 72 | ); |
| 73 | } |
| 74 | |
| 75 | export function SubmitGithubForm() { |
| 76 | const router = useRouter(); |
| 77 | const [loading, setLoading] = React.useState(false); |
| 78 | const username = useInitialUsername(); |
| 79 | |
| 80 | const form = useForm<z.infer<typeof formSchema>>({ |
| 81 | defaultValues: { |
| 82 | githubProfileUrl: username ? `https://github.com/${username}` : "", |
| 83 | }, |
nothing calls this directly
no test coverage detected