text: 
  import SearchForm from "./components/searchform.js"
  import React from 'react';
  import { JsonToTable } from "react-json-to-table";
  import axios from 'axios';
  import Navbar from "./components/navbar.js"
  
  import { BrowserRouter as Router,useHistory, Route} from "react-router-dom";
  
      
  const SECURITY_TOKEN = sessionStorage.getItem('SECURITY_TOKEN');
  console.log("token is ",SECURITY_TOKEN);
  
  class Records extends React.Component  {
  
      constructor(props) {
        super(props);
      }
      
      state={
        table:[],
        searchfield:[],
      }
      componentDidMount(){
        let data ;
  
    window.onload = function() {
      if(!window.location.hash) {
        window.location = window.location + '#loaded';
        window.location.reload();
      }
    }
      
            axios.get(this.props.table, 
            { headers: {
              "Authorization": 'Token ' + SECURITY_TOKEN,
             "Content-Type": "application/json"
             }})
            .then(res => {
                data = res.data;
                this.setState({
                    table : data['table'],
                    searchfield:data['searchfield']   
                });
            })
            .catch(err => {})
      }
  
    render(){
      console.log(this.props)
      return (
      <Router>
          
            {/* <Navbar /> */}
            <div className="card-container">
            <div className="container">
            <SearchForm searchfield={this.state.searchfield}/>
            <JsonToTable json={this.state.table} />
          </div>
          </div>
      </Router>
    );
      
    }
  }
  
  export default Records;
  