🐱😒💋
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
import { useUserContext } from '../contexts/UserContext'
|
||||
import { Redirect, Route, Switch } from 'react-router'
|
||||
import { Route, Switch } from 'react-router'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { Dashboard } from './pages/Dashboard'
|
||||
import { UserForm } from './components/UserForm'
|
||||
import { TransactionList } from './components/TransactionList'
|
||||
import { AccountForm } from './components/AccountForm'
|
||||
import { Login } from './components/Login'
|
||||
|
||||
export const CoreLayout = () => {
|
||||
const { user, accounts, selectedAccount } = useUserContext()
|
||||
const { user, selectedAccount } = useUserContext()
|
||||
|
||||
if (!accounts?.length) <Redirect to="/account/new" />
|
||||
if (!user) return <Login />
|
||||
|
||||
return (
|
||||
<div className="app" id="appElement">
|
||||
<div className="app">
|
||||
<nav>
|
||||
<Link to="/">Home</Link>
|
||||
<Link to="/select">Select Budget</Link>
|
||||
|
||||
Reference in New Issue
Block a user