diff --git a/src/App.jsx b/src/App.jsx index 16f82f1..bb47611 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -13,6 +13,8 @@ import AppLayout from './components/layout'; import Auth from './components/auth'; import Login from './components/login'; import Logout from './components/logout'; +import MatchHistory from './components/pages/match-history'; +import UserProfile from './components/pages/user-profile'; function App() { return ( @@ -34,6 +36,12 @@ function App() { + + + + + + diff --git a/src/components/auth.js b/src/components/auth.js index 2b92dd7..6acddcd 100644 --- a/src/components/auth.js +++ b/src/components/auth.js @@ -8,6 +8,14 @@ import { partial } from 'ap'; import { refreshAuthToken } from '../api/auth'; +Request.configure({ + baseUrl: "https://chrisinajar.com:2053", + // baseUrl: 'http://localhost:6969/', + options: { + json: true + } +}); + const initialState = { user: null, hasUpdated: false, diff --git a/src/components/user-info.jsx b/src/components/user-info.jsx index e0be743..00e4bbe 100644 --- a/src/components/user-info.jsx +++ b/src/components/user-info.jsx @@ -23,7 +23,7 @@ function UserInfo(props = {}) { const [userProfile, setUserProfile] = useState(props.userProfile || null); const { user } = userState; - const greeting = (user.steamid === userId) ? 'Hello, ' : ''; + const greeting = (user && user.steamid === userId) ? 'Hello, ' : ''; useEffect(() => { async function fetchData() {