import React from 'react'; import Select from 'antd/lib/select'; import Cookies from 'universal-cookie'; import { StorageType } from '../server/storage.typing'; import { loadRepos, getRepo } from '../server/service'; import { useAsync } from '../hook/useAsync'; interface Props { storageType: StorageType; loadProjects?: () => Promise; defaultValue?: string | number; } export const ProjectRepos = ({ storageType, loadProjects, defaultValue }: Props) => { const { result: repos } = useAsync(() => loadRepos(storageType)); const { result: repo } = useAsync(() => getRepo(storageType)); return !repos ? null : ( ); }