import React, { useEffect } from 'react'; import Mousetrap from 'mousetrap'; import { BrowserRouter, Switch, Route, useHistory } from 'react-router-dom'; import { Grid } from './pages/Grid'; import useDocketState from './state/docket'; const AppRoutes = () => { const { push } = useHistory(); useEffect(() => { window.name = 'grid'; const { fetchAllies, fetchCharges } = useDocketState.getState(); fetchCharges(); fetchAllies(); Mousetrap.bind(['command+/', 'ctrl+/'], () => { push('/leap/search'); }); }, []); return ( ); }; export function App() { const base = import.meta.env.MODE === 'mock' ? undefined : '/apps/grid'; return ( ); }