1
0
Fork 0

docs(apply): require repository link

This commit is contained in:
Clément Vannicatte 2022-01-20 10:07:24 +01:00
parent ca19e01635
commit ca40c6614b

View file

@ -15,6 +15,7 @@ function ApplyForm() {
const [state, setState] = useState({ status: 'stalled', message: '' });
const [url, setUrl] = useState('');
const [email, setEmail] = useState('');
const [repo, setRepo] = useState('');
const handleSetUrl = (event) => {
setUrl(event.target.value);
@ -22,6 +23,9 @@ function ApplyForm() {
const handleSetEmail = (event) => {
setEmail(event.target.value);
};
const handleSetRepo = (event) => {
setRepo(event.target.value);
};
const onSubmit = (event) => {
event.preventDefault();
@ -151,6 +155,29 @@ function ApplyForm() {
and grant access to your Algolia application.
</Text>
<LabelText
tag="label"
htmlFor="repoURL"
key="repoURL"
className="apply-text"
>
Repository URL
<Input
required={true}
id="repoURL"
type="repoURL"
name="repoURL"
aria-label="The URL of your project repository"
value={repo}
placeholder="https://github.com/algolia/docsearch | https://gitlab.com/gitlab-org/gitlab"
onChange={handleSetRepo}
/>
</LabelText>
<Text small={true} className="uil-pv-8 uil-d-block apply-text">
We will use this link to determine if your project is open-source.
</Text>
<div className="uil-ph-32 uil-d-flex uil-fxd-column">
<LabelText
className="uil-pt-12 apply-text"