Skip to content
Snippets Groups Projects
Commit 53c6296f authored by Nico Vermaas's avatar Nico Vermaas
Browse files

abandoned the shoppingbasket mechanism for VOReg (functionality is too inmature)

parent 3b54aae6
No related branches found
No related tags found
1 merge request!15abandoned the shoppingbasket mechanism for VOReg (functionality is too inmature)
Pipeline #13674 passed
......@@ -4,15 +4,6 @@ import { QueryContext } from "../../contexts/QueryContext";
import LoadingSpinner from "../LoadingSpinner";
import Paginate from "../Paginate";
import { IVOAContext } from "../../contexts/IVOAContext";
import SaveBasket from "../basket/savebasket";
import AddToBasket from "../basket/addtobasket";
function SAMPBasketItem(record){
return {
archive: "ivoa",
record: record,
};
}
export default function VORegListResults({ catalog }) {
const { queryMap } = useContext(QueryContext);
......@@ -60,7 +51,7 @@ export default function VORegListResults({ catalog }) {
numAdjacent={3}
numPages={numPages}
/>
<SaveBasket />
<Table className="mt-3" responsive>
<thead>
<tr className="bg-light">
......@@ -110,9 +101,7 @@ export default function VORegListResults({ catalog }) {
/>
</InputGroup>
</th>
<td>
<AddToBasket id={result.id} item={SAMPBasketItem(result)} />
</td>
<td>{result.short_name}</td>
<td>{result.access_url}</td>
<td>{result.waveband}</td>
......
......@@ -33,6 +33,7 @@ export default function VORegistryResults({ catalog }) {
numAdjacent={3}
numPages={numPages}
/>
<Table className="mt-3" responsive>
<thead>
<tr className="bg-light">
......@@ -61,7 +62,9 @@ export default function VORegistryResults({ catalog }) {
return (
<>
<tr key={queryResult[queryMap.get(catalog).vo_table_schema.fields.findIndex((item) => item.name === "access_url")]}>
{queryResult.map((field, index) => {
if (indice.includes(index)) {
if (queryMap.get(catalog).vo_table_schema.fields[index].name === "access_url") {
return (<td><a href={field} rel="noopener noreferrer" download>Download data</a></td>);
......
......@@ -37,7 +37,7 @@ export default function SampResults(props) {
{data.map((record, index) => {
let id = `samp${index}`
if (index > 10) {
if (index > 1000) {
return
}
return (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment