diff --git a/packages/frontend/src/pages/org-slug/projects/create/template/index.tsx b/packages/frontend/src/pages/org-slug/projects/create/template/index.tsx index 9ff50c84..8f8a0f39 100644 --- a/packages/frontend/src/pages/org-slug/projects/create/template/index.tsx +++ b/packages/frontend/src/pages/org-slug/projects/create/template/index.tsx @@ -1,15 +1,23 @@ import React, { useCallback, useEffect, useState } from 'react'; -import { useForm, Controller, SubmitHandler } from 'react-hook-form'; +import { useForm, SubmitHandler } from 'react-hook-form'; import { useNavigate, useOutletContext, useParams } from 'react-router-dom'; import toast from 'react-hot-toast'; import assert from 'assert'; -import { Button, Option, Typography } from '@material-tailwind/react'; - import { useOctokit } from '../../../../../context/OctokitContext'; import { useGQLClient } from '../../../../../context/GQLClientContext'; -import AsyncSelect from '../../../../../components/shared/AsyncSelect'; import { Template } from '../../../../../types'; +import { Heading } from 'components/shared/Heading'; +import { Input } from 'components/shared/Input'; +import { Radio } from 'components/shared/Radio'; +import { Select } from 'components/shared/Select'; +import { + ArrowRightCircleFilledIcon, + GitIcon, + GitTeaIcon, +} from 'components/shared/CustomIcon'; +import { Checkbox } from 'components/shared/Checkbox'; +import { Button } from 'components/shared/Button'; type SubmitRepoValues = { framework: string; @@ -30,6 +38,19 @@ const CreateRepo = () => { const [gitAccounts, setGitAccounts] = useState([]); const [isLoading, setIsLoading] = useState(false); + const FRAMEWORK_OPTIONS = [ + { + value: 'react-native', + label: 'React Native', + leftIcon: , + }, + { + value: 'expo', + label: 'Expo', + leftIcon: , + }, + ]; + const submitRepoHandler: SubmitHandler = useCallback( async (data) => { assert(data.account); @@ -93,7 +114,7 @@ const CreateRepo = () => { fetchUserAndOrgs(); }, [octokit]); - const { register, handleSubmit, control, reset } = useForm({ + const { handleSubmit, reset } = useForm({ defaultValues: { framework: 'React', repoName: '', @@ -110,86 +131,49 @@ const CreateRepo = () => { return (
-
- - Create a repository - - - The project will be cloned into this repository - -
-
-
Framework
-
- - -
-
-
-
Git account
+
- ( - - {gitAccounts.map((account, key) => ( - - ))} - - )} + Create a repository + + The project will be cloned into this repository + +
+
+ Framework +
-
-
-
Name the repo
+
+ Git account + +
- + +
+
+
-
-
- -
-
-
);