Skip to content

Commit

Permalink
fixed states and on click functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlaltaf committed Dec 9, 2024
1 parent eda9d9e commit 5fef3dc
Showing 1 changed file with 28 additions and 33 deletions.
61 changes: 28 additions & 33 deletions client/src/pages/DownloadPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ export default function Download() {
};

const handleSpeciesChange = (event) => {
setTxid(event.target.value);
console.log(speciesDict[event.target.value]);
const txid = event.target.value
setTxid(txid);
setSpecies(speciesDict[txid])
};

async function handleDownload(e) {
Expand All @@ -23,7 +24,7 @@ export default function Download() {
console.log(`API call on /api/downloads/${file}`);
} else {
console.log(
`API call on /api/downloads/${txid}_${species}_${file}`
`API call on /api/downloads/${txid}_${file}`
);
}
}
Expand Down Expand Up @@ -61,11 +62,10 @@ export default function Download() {
</div>
</div>
<div className="download-table-row">
<div
className="download-table-column"
onClick={handleDownload}
>
<p>protein_protein_interaction.csv</p>
<div className="download-table-column">
<p onClick={handleDownload}>
protein_protein_interaction.csv
</p>
</div>
<div className="download-table-column">
Complete edge file of protein-protein
Expand All @@ -76,11 +76,10 @@ export default function Download() {
</div>
</div>
<div className="download-table-row">
<div
className="download-table-column"
onClick={handleDownload}
>
<p>regulatory_interaction.csv</p>
<div className="download-table-column">
<p onClick={handleDownload}>
regulatory_interaction.csv
</p>
</div>
<div className="download-table-column">
Complete edge file of
Expand All @@ -91,11 +90,10 @@ export default function Download() {
</div>
</div>
<div className="download-table-row">
<div
className="download-table-column"
onClick={handleDownload}
>
<p>mixed_interaction.csv</p>
<div className="download-table-column">
<p onClick={handleDownload}>
mixed_interaction.csv
</p>
</div>
<div className="download-table-column">
Complete edge file with both protein-protein
Expand All @@ -106,11 +104,10 @@ export default function Download() {
</div>
</div>
<div className="download-table-row">
<div
className="download-table-column"
onClick={handleDownload}
>
<p>gene_ontology_annotation.csv</p>
<div className="download-table-column">
<p onClick={handleDownload}>
gene_ontology_annotation.csv
</p>
</div>
<div className="download-table-column">
Gene ontology annotation for{" "}
Expand All @@ -120,23 +117,21 @@ export default function Download() {
</div>
</div>
<div className="download-table-row">
<div
className="download-table-column"
onClick={handleDownload}
>
<p>complete_gene_ontology_annotation.csv</p>
<div className="download-table-column">
<p onClick={handleDownload}>
complete_gene_ontology_annotation.csv
</p>
</div>
<div className="download-table-column">
Complete gene ontology annotation for all
species
</div>
</div>
<div className="download-table-row">
<div
className="download-table-column"
onClick={handleDownload}
>
<p>complete_gene_ontology_hierarchy.csv</p>
<div className="download-table-column">
<p onClick={handleDownload}>
complete_gene_ontology_hierarchy.csv
</p>
</div>
<div className="download-table-column">
Complete gene ontology hierarchy
Expand Down

0 comments on commit 5fef3dc

Please sign in to comment.