Skip to content

Commit 5d6171d

Browse files
authored
feat(repo-form): route to org-listing if no repo specified (#28)
1 parent 9f199ad commit 5d6171d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/repo-form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const initialValues: Repo = {
1313

1414
const validationSchema = object().shape({
1515
owner: string().required("Please enter a repository owner"),
16-
name: string().required("Please enter a repository name"),
16+
name: string().optional(),
1717
});
1818

1919
function RepoFormComponent(props: FormikProps<Repo>) {
@@ -106,7 +106,7 @@ export function RepoForm() {
106106
validateOnBlur={false}
107107
validateOnChange={false}
108108
onSubmit={(values) => {
109-
history.push(`/${values.owner}/${values.name}`);
109+
history.push(`/${values.owner}/` + (values.name || ''))
110110
}}
111111
/>
112112
);

0 commit comments

Comments
 (0)