import React from 'react'; import IndexPage from './IndexPage.js'; const targetUrl = "http://localhost:3003" class App extends React.Component { constructor(props) { super(props) this.state = {targetUrl: targetUrl, loggedIn: false} } componentDidMount() { fetch(this.targetUrl, {credentials: 'include'}) .then(response => response.json()) .then(data => this.setState({loggedIn: data.logged_in})); } render() { return (
); } } export default App;