Skip to content

Commit 1bc6439

Browse files
authored
feat(shortcuts): add key bindings and hints (#2515)
* feat(sidebar): shortcut key bindings and hints
1 parent cf95b3b commit 1bc6439

36 files changed

Lines changed: 2455 additions & 218 deletions

src/renderer/App.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88

99
import { BaseStyles, ThemeProvider } from '@primer/react';
1010

11-
import { AppProvider, useAppContext } from './context/App';
11+
import { AppProvider } from './context/App';
1212
import { AccountsRoute } from './routes/Accounts';
1313
import { FiltersRoute } from './routes/Filters';
1414
import { LoginRoute } from './routes/Login';
@@ -17,14 +17,18 @@ import { LoginWithPersonalAccessTokenRoute } from './routes/LoginWithPersonalAcc
1717
import { NotificationsRoute } from './routes/Notifications';
1818
import { SettingsRoute } from './routes/Settings';
1919

20+
import { GlobalShortcuts } from './components/GlobalShortcuts';
2021
import { AppLayout } from './components/layout/AppLayout';
2122

2223
import './App.css';
2324

25+
import { useAppContext } from './hooks/useAppContext';
26+
2427
function RequireAuth({ children }) {
25-
const { isLoggedIn } = useAppContext();
2628
const location = useLocation();
2729

30+
const { isLoggedIn } = useAppContext();
31+
2832
return isLoggedIn ? (
2933
children
3034
) : (
@@ -38,6 +42,7 @@ export const App = () => {
3842
<BaseStyles>
3943
<AppProvider>
4044
<Router>
45+
<GlobalShortcuts />
4146
<AppLayout>
4247
<Routes>
4348
<Route

src/renderer/components/AllRead.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { type FC, useMemo } from 'react';
22

33
import { Constants } from '../constants';
44

5-
import { useAppContext } from '../context/App';
5+
import { useAppContext } from '../hooks/useAppContext';
66

77
import { EmojiSplash } from './layout/EmojiSplash';
88

0 commit comments

Comments
 (0)