* Implements Basic Routing and API * Implements Package.json file select and json parse * Displays Project Name, Version & Desc from the package.json * Fetch all package details using npm registry API and map it based on package name
17 lines
465 B
TypeScript
17 lines
465 B
TypeScript
import {JSX} from 'preact';
|
|
|
|
export default function UploadButton(props: JSX.HTMLAttributes<HTMLInputElement>) {
|
|
|
|
return(
|
|
<form action="/analyze" method="post" encType="multipart/form-data">
|
|
<input
|
|
{...props}
|
|
name="packagefile"
|
|
type="file"
|
|
accept={".json"}
|
|
// onChange={getFileData}
|
|
/>
|
|
<button type="submit">Submit</button>
|
|
</form>
|
|
);
|
|
} |