-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from weng-lab/Add-More-Linked-Genes
Add More Linked Genes
- Loading branch information
Showing
13 changed files
with
426 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
"use client" | ||
import { Typography } from "@mui/material" | ||
import BedUpload from "../../../common/components/BedUpload" | ||
|
||
export default function MultiRegionSearch() { | ||
return ( | ||
<main> | ||
<Typography>This is the Multi-Region Search page</Typography> | ||
<Typography variant="h6" mt={2}>Find Intersecting cCREs from BED file</Typography> | ||
<BedUpload /> | ||
</main> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
"use client" | ||
|
||
import React, { useState } from "react" | ||
import { Button, Typography, Box } from "@mui/material" | ||
import Dropzone from "react-dropzone" | ||
|
||
|
||
/** | ||
* Things to improve upon old upload: | ||
* - Prevent upload of non BED files | ||
* - Clear files | ||
* - Convert byte size to mb/gb | ||
*/ | ||
const BedUpload = () => { | ||
const [files, setFiles] = useState<File[]>([]) | ||
|
||
function handleFileUploads(uploads){ | ||
setFiles([...files, ...uploads]) | ||
} | ||
|
||
return ( | ||
<Box mt="1rem"> | ||
<Dropzone onDrop={acceptedFiles => handleFileUploads(acceptedFiles)}> | ||
{({ getRootProps, getInputProps }) => ( | ||
<section> | ||
<div {...getRootProps()}> | ||
<input {...getInputProps()} /> | ||
<Button>Drag and drop some files here, or click to select files</Button> | ||
</div> | ||
</section> | ||
)} | ||
</Dropzone> | ||
<br /> | ||
{files.map((file: File, index: number) => { | ||
return <Typography key={index}>{file.name} - {file.size} bytes</Typography> | ||
})} | ||
{files.length > 0 && <Button onClick={() => setFiles([])}>Clear Files</Button>} | ||
</Box> | ||
) | ||
} | ||
|
||
export default BedUpload |
Oops, something went wrong.