import { Routes, Route } from 'react-router-dom'; import Navigation from './components/Navigation'; import Conversation from './components/Conversation/Conversation'; import APIKeyModal from './components/APIKeyModal'; import About from './components/About'; import { useState } from 'react'; import { ActiveState } from './models/misc'; import { selectApiKeyStatus } from './store'; import { useSelector } from 'react-redux'; export default function App() { const isApiKeySet = useSelector(selectApiKeyStatus); const [navState, setNavState] = useState('ACTIVE'); const [apiKeyModalState, setApiKeyModalState] = useState( isApiKeySet ? 'INACTIVE' : 'ACTIVE', ); return (
setNavState(val)} setApiKeyModalState={setApiKeyModalState} />
} /> } />
); }