Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: categories.tsv was downloading interactions #475

Merged
merged 3 commits into from
Feb 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading