Skip to content

Commit f758372

Browse files
committed
feat(frontend): add project zip hero action
1 parent 6228ddd commit f758372

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

apps/frontend/src/app/page.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff 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>

0 commit comments

Comments
 (0)