on 201ebb2 help sign in
122 lines 4.0 kB history raw
1import Link from "next/link";
2import Container from "../../components/Container";
3import Section from "../../components/Section";
4import SingleColumn from "../../components/SingleColumn";
5import { useInputChange } from "../../lib/hooks";
7const SubmissionPage = () => {
8 const [form, handleFormChange] = useInputChange();
10 const href = `https://github.com/urbit/urbit.org/new/master?filename=/content/application/${
11 form?.shortcode
12 }.md&value=${encodeURIComponent(
13 `+++
14title = "${form?.appName}"
15shortcode = "${form?.shortcode}"
16license = "${form?.license || ""}"
17image = "${form?.imageUrl || ""}"
18developer = "${form?.developer || ""}"
19website = "${form?.website || ""}"
20+++
22${form?.description || ""}`
23 )}`;
25 return (
26 <Container>
27 <SingleColumn>
28 <Section narrow className="space-y-12">
29 <div className="flex flex-col space-y-4">
30 <h2>Submit your application</h2>
31 <p>
32 Application submissions are accomplished through a GitHub pull
33 request.
34 </p>
35 <p>
36 You’ll need <a href="https://github.com">a GitHub account</a>{" "}
37 before you get started to submit your group.
38 </p>
39 <p>
40 First, enter your information and then click “Submit with GitHub.”
41 You’ll be directed to a GitHub pull request page with a
42 pre-populated markdown file. Click “Propose new file,” and then
43 “Create pull request” on the following page.
44 </p>
45 </div>
46 <div className="flex flex-col space-y-4">
47 <h3>Enter your application information</h3>
48 <div className="flex flex-col">
49 <p>Application name (required)</p>
50 <input
51 className="bg-wall-100 p-2"
52 name="appName"
53 onChange={handleFormChange}
54 />
55 </div>
56 <div className="flex flex-col">
57 <p>
58 Shortcode (e.g. <code>~paldev/pals</code>) (required)
59 </p>
60 <input
61 className="bg-wall-100 p-2"
62 name="shortcode"
63 onChange={handleFormChange}
64 />
65 </div>
66 <div className="flex flex-col">
67 <p>App image URL</p>
68 <input
69 className="bg-wall-100 p-2"
70 name="imageUrl"
71 onChange={handleFormChange}
72 />
73 </div>
74 <div className="flex flex-col">
75 <p>License (e.g. MIT)</p>
76 <input
77 className="bg-wall-100 p-2"
78 name="license"
79 onChange={handleFormChange}
80 />
81 </div>
82 <div className="flex flex-col">
83 <p>Developer</p>
84 <input
85 className="bg-wall-100 p-2"
86 name="developer"
87 onChange={handleFormChange}
88 />
89 </div>
90 <div className="flex flex-col">
91 <p>Website</p>
92 <input
93 className="bg-wall-100 p-2"
94 name="website"
95 onChange={handleFormChange}
96 />
97 </div>
98 <div className="flex flex-col">
99 <p>Description</p>
100 <textarea
101 className="resize-none bg-wall-100 p-2 h-60"
102 name="description"
103 onChange={handleFormChange}
104 />
105 </div>
106 </div>
107 <button
108 className="button-lg bg-wall-600 text-wall-100"
109 onClick={() => window.open(href)}
110 >
111 Submit with GitHub
112 </button>
113 <Link href="/">
114 <a className="text-xl pt-8 block font-semibold">Urbit.org</a>
115 </Link>
116 </Section>
117 </SingleColumn>
118 </Container>
119 );
120};
122export default SubmissionPage;