import React from "react" ; import ReactDOM from "react-dom" ; import { BrowserRouter, Route, Switch } from "react-router-dom" ; import { App, gAppRef } from "./App" ; import { PublicationSearchResult } from "./PublicationSearchResult" ; import "./index.css" ; const axios = require( "axios" ) ; // -------------------------------------------------------------------- ReactDOM.render( gAppRef._showPublishers(false) } /> } /> gAppRef._showTechniqueArticles(false) } /> } /> gAppRef._showTipsArticles(false) } /> } /> gAppRef.runSpecialSearch( "/search/publisher/"+gAppRef.props.match.params.publId, null, () => gAppRef.setWindowTitleFromSearchResults( "publisher", "publ_id", gAppRef.props.match.params.publId, "publ_name" ) ) } /> } /> gAppRef.runSpecialSearch( "/search/publication/"+gAppRef.props.match.params.pubId, null, () => gAppRef.setWindowTitleFromSearchResults( "publication", "pub_id", gAppRef.props.match.params.pubId, sr => { return PublicationSearchResult.makeDisplayName( sr ) } ) ) } /> } /> gAppRef.runSpecialSearch( "/search/article/"+gAppRef.props.match.params.articleId, null, () => gAppRef.setWindowTitleFromSearchResults( "article", "article_id", gAppRef.props.match.params.articleId, "article_title" ) ) } /> } /> gAppRef.runSpecialSearch( "/search/author/"+gAppRef.props.match.params.authorId, null, () => { axios.get( gAppRef.makeFlaskUrl( "/author/" + gAppRef.props.match.params.authorId ) ).then( resp => { const author = resp.data ; gAppRef.setWindowTitle( author ? author.author_name : "Unknown author" ) } ) ; } ) } /> } /> gAppRef.runSpecialSearch( "/search/tag/"+gAppRef.props.match.params.tag, null, () => gAppRef.setWindowTitle( gAppRef.props.match.params.tag ) ) } /> } /> } /> } /> , document.getElementById( "app" ) ) ;