2019-01-17 17:59:47 +01:00
|
|
|
// Libraries
|
2018-04-27 15:42:35 +02:00
|
|
|
import React, { PureComponent } from 'react';
|
|
|
|
|
|
2019-01-17 17:59:47 +01:00
|
|
|
// Components
|
|
|
|
|
import QueryRow from './QueryRow';
|
|
|
|
|
|
|
|
|
|
// Types
|
2018-11-23 15:12:20 +01:00
|
|
|
import { Emitter } from 'app/core/utils/emitter';
|
2019-01-13 23:10:23 +01:00
|
|
|
import { ExploreId } from 'app/types/explore';
|
2018-10-24 11:08:15 +02:00
|
|
|
|
2019-01-13 23:10:23 +01:00
|
|
|
interface QueryRowsProps {
|
2018-10-24 14:55:56 +02:00
|
|
|
className?: string;
|
2018-11-23 15:12:20 +01:00
|
|
|
exploreEvents: Emitter;
|
2019-01-13 23:10:23 +01:00
|
|
|
exploreId: ExploreId;
|
2019-02-04 13:41:29 +01:00
|
|
|
queryKeys: string[];
|
2018-04-27 15:42:35 +02:00
|
|
|
}
|
2019-01-17 17:59:47 +01:00
|
|
|
|
2018-10-24 14:55:56 +02:00
|
|
|
export default class QueryRows extends PureComponent<QueryRowsProps> {
|
2018-04-27 15:42:35 +02:00
|
|
|
render() {
|
2019-02-04 13:41:29 +01:00
|
|
|
const { className = '', exploreEvents, exploreId, queryKeys } = this.props;
|
2018-04-27 15:42:35 +02:00
|
|
|
return (
|
2018-04-27 18:21:20 +02:00
|
|
|
<div className={className}>
|
2019-02-04 13:41:29 +01:00
|
|
|
{queryKeys.map((key, index) => {
|
2019-02-04 11:07:32 +01:00
|
|
|
return <QueryRow key={key} exploreEvents={exploreEvents} exploreId={exploreId} index={index} />;
|
|
|
|
|
})}
|
2018-04-27 18:21:20 +02:00
|
|
|
</div>
|
2018-04-27 15:42:35 +02:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|