Skip to content

Commit

Permalink
fix: categories.tsv was downloading interactions (#475)
Browse files Browse the repository at this point in the history
* fix: categories.tsv was downloading interactions

* feat: change top row of data downloads to latest

* feat: change top row of data downloads to latest
  • Loading branch information
katiestahl authored Feb 16, 2024
1 parent ead2448 commit ab25888
Showing 1 changed file with 16 additions and 61 deletions.
77 changes: 16 additions & 61 deletions client/src/pages/Downloads/Files/Files.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,66 +13,24 @@ import Paper from '@mui/material/Paper';
// style
import './Files.scss';

function createData(
date: string,
interactions: string,
genes: string,
drugs: string,
categories: string
) {
return { date, interactions, genes, drugs, categories };
function getDataObj(date: string) {
return {
date,
interactions: 'interactions.tsv',
genes: 'genes.tsv',
drugs: 'drugs.tsv',
categories: 'categories.tsv',
};
}

const rows = [
createData(
'2023-Dec',
'interactions.tsv',
'genes.tsv',
'drugs.tsv',
'categories.tsv'
),
createData(
'2022-Feb',
'interactions.tsv',
'genes.tsv',
'drugs.tsv',
'categories.tsv'
),
createData(
'2021-May',
'interactions.tsv',
'genes.tsv',
'drugs.tsv',
'categories.tsv'
),
createData(
'2021-Jan',
'interactions.tsv',
'genes.tsv',
'drugs.tsv',
'categories.tsv'
),
createData(
'2020-Nov',
'interactions.tsv',
'genes.tsv',
'drugs.tsv',
'categories.tsv'
),
createData(
'2020-Oct',
'interactions.tsv',
'genes.tsv',
'drugs.tsv',
'categories.tsv'
),
createData(
'2020-Sep',
'interactions.tsv',
'genes.tsv',
'drugs.tsv',
'categories.tsv'
),
getDataObj('latest'),
getDataObj('2022-Feb'),
getDataObj('2021-May'),
getDataObj('2021-Jan'),
getDataObj('2020-Nov'),
getDataObj('2020-Oct'),
getDataObj('2020-Sep'),
];

export const Files = () => {
Expand Down Expand Up @@ -123,10 +81,7 @@ export const Files = () => {
</a>
</TableCell>
<TableCell align="center">
<a
download
href={'data/' + row.date + '/' + row.interactions}
>
<a download href={'data/' + row.date + '/' + row.categories}>
{row.categories}
</a>
</TableCell>
Expand Down

0 comments on commit ab25888

Please sign in to comment.