11import { Component , useEffect , useState } from "react" ;
2- import { Datagrid , ListView , Title , useListContext } from "react-admin" ;
2+ import { Datagrid , ListView , Title , useListContext , useResourceDefinition } from "react-admin" ;
33import ActionBar from "../../ActionBar/ActionBar" ;
44import GenericField from "../../../representationProvider/GenericField" ;
55import { Term } from "sparqljs" ;
66import config from "../../../config" ;
77import TableHeader from "./TableHeader/TableHeader" ;
88import Button from '@mui/material/Button' ;
99import SearchOffIcon from '@mui/icons-material/SearchOff' ;
10- import { SvgIcon , Box } from "@mui/material" ;
10+ import { SvgIcon , Box , Typography } from "@mui/material" ;
1111
1212/**
1313 * @param {object } props - the props passed down to the component
1414 * @returns {Component } custom ListViewer as defined by react-admin containing the results of the query with each variable its generic field.
1515 */
1616function QueryResultList ( props ) {
17+ const QueryTitle = useResourceDefinition ( ) . options . label ;
1718 const { data } = useListContext ( props ) ;
1819 const { changeVariables, submitted} = props ;
1920 const [ values , setValues ] = useState ( undefined ) ;
@@ -28,8 +29,9 @@ function QueryResultList(props) {
2829 return (
2930 < >
3031 < Title title = { config . title } />
31- { submitted && < Aside changeVariables = { changeVariables } /> /* Adding button to make a new query - top left corner */ }
3232
33+ { submitted && < Aside changeVariables = { changeVariables } /> /* Adding button to make a new query - top left corner */ }
34+ < Typography fontSize = { "2rem" } mt = { 2 } > { QueryTitle } </ Typography >
3335 { values ?(
3436 < ListView title = " " actions = { < ActionBar /> } { ...props } >
3537 < Datagrid header = { < TableHeader config = { config } /> } bulkActionButtons = { false } >
0 commit comments