File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,6 +77,10 @@ export default function Home() {
7777 setStatus ( file ? `Attached ${ file . name } ` : "Project removed" ) ;
7878 } ;
7979
80+ const handleChooseProject = ( ) => {
81+ projectRef . current ?. click ( ) ;
82+ } ;
83+
8084 const handleUpload = async ( ) => {
8185 if ( ! selectedFile || isUploading ) {
8286 return ;
@@ -234,10 +238,21 @@ export default function Home() {
234238 < button className = "primary-button" type = "button" onClick = { handleChooseFile } >
235239 Choose bundle
236240 </ button >
241+ < button className = "secondary-button" type = "button" onClick = { handleChooseProject } >
242+ Attach project zip
243+ </ button >
237244 < button className = "secondary-button" type = "button" onClick = { handleExampleReport } >
238245 View example report
239246 </ button >
240247 </ div >
248+ < input
249+ ref = { projectRef }
250+ className = "file-input"
251+ type = "file"
252+ accept = ".zip"
253+ onChange = { handleProjectChange }
254+ hidden
255+ />
241256 < div className = "hero-meta" >
242257 < div >
243258 < strong className = "stat" > 2-4 min</ strong >
You can’t perform that action at this time.
0 commit comments